]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mm/memcg: kill mem_cgroup_lru_del()
authorKonstantin Khlebnikov <khlebnikov@openvz.org>
Wed, 25 Apr 2012 01:03:45 +0000 (11:03 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 30 Apr 2012 05:17:25 +0000 (15:17 +1000)
This patch kills mem_cgroup_lru_del(), we can use
mem_cgroup_lru_del_list() instead.  On 0-order isolation we already have
right lru list id.

Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Glauber Costa <glommer@parallels.com>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Minchan Kim <minchan@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/memcontrol.h
mm/memcontrol.c
mm/vmscan.c

index 78989bbe2c62bdbd25d70cd63434ec336988a303..de2c43676cbacbe1030c90ae6103a02bf818ffec 100644 (file)
@@ -66,7 +66,6 @@ struct lruvec *mem_cgroup_zone_lruvec(struct zone *, struct mem_cgroup *);
 struct lruvec *mem_cgroup_lru_add_list(struct zone *, struct page *,
                                       enum lru_list);
 void mem_cgroup_lru_del_list(struct page *, enum lru_list);
-void mem_cgroup_lru_del(struct page *);
 struct lruvec *mem_cgroup_lru_move_lists(struct zone *, struct page *,
                                         enum lru_list, enum lru_list);
 
@@ -260,10 +259,6 @@ static inline void mem_cgroup_lru_del_list(struct page *page, enum lru_list lru)
 {
 }
 
-static inline void mem_cgroup_lru_del(struct page *page)
-{
-}
-
 static inline struct lruvec *mem_cgroup_lru_move_lists(struct zone *zone,
                                                       struct page *page,
                                                       enum lru_list from,
index 4b794c062020c45a94e6f2c2b7915a49fd101b34..9e565e392127ae2188a88a4395162e8fad650d48 100644 (file)
@@ -1124,11 +1124,6 @@ void mem_cgroup_lru_del_list(struct page *page, enum lru_list lru)
        mz->lru_size[lru] -= 1 << compound_order(page);
 }
 
-void mem_cgroup_lru_del(struct page *page)
-{
-       mem_cgroup_lru_del_list(page, page_lru(page));
-}
-
 /**
  * mem_cgroup_lru_move_lists - account for moving a page between lrus
  * @zone: zone of the page
index ba8c62a8283d51d1b25e12613db413d3e67eec9a..98413b740734e3fa6bd1ea5e8025d43a7280fcb8 100644 (file)
@@ -1056,7 +1056,7 @@ static unsigned long isolate_lru_pages(unsigned long nr_to_scan,
 
                switch (__isolate_lru_page(page, mode)) {
                case 0:
-                       mem_cgroup_lru_del(page);
+                       mem_cgroup_lru_del_list(page, lru);
                        list_move(&page->lru, dst);
                        nr_taken += hpage_nr_pages(page);
                        break;