aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorKonstantin Khlebnikov <khlebnikov@openvz.org>2012-05-29 18:07:00 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-05-29 19:22:26 -0400
commit074291fea8bcedeabf295360e2ddd9bbb5830b4a (patch)
tree01531a2ca7e9b648a4d8cd9bc772aa484ed2190d /include/linux
parent27ac81d85e5cfcc755dd5fa3f04dc883ab5d821b (diff)
mm/vmscan: replace zone_nr_lru_pages() with get_lruvec_size()
If memory cgroup is enabled we always use lruvecs which are embedded into struct mem_cgroup_per_zone, so we can reach lru_size counters via container_of(). Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org> Cc: Mel Gorman <mel@csn.ul.ie> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Acked-by: Hugh Dickins <hughd@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/memcontrol.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
index e3fc200cd68e..ccb3e3c65dd2 100644
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -123,8 +123,7 @@ int mem_cgroup_inactive_anon_is_low(struct mem_cgroup *memcg,
123int mem_cgroup_inactive_file_is_low(struct mem_cgroup *memcg, 123int mem_cgroup_inactive_file_is_low(struct mem_cgroup *memcg,
124 struct zone *zone); 124 struct zone *zone);
125int mem_cgroup_select_victim_node(struct mem_cgroup *memcg); 125int mem_cgroup_select_victim_node(struct mem_cgroup *memcg);
126unsigned long mem_cgroup_zone_nr_lru_pages(struct mem_cgroup *memcg, 126unsigned long mem_cgroup_get_lruvec_size(struct lruvec *lruvec, enum lru_list);
127 int nid, int zid, unsigned int lrumask);
128struct zone_reclaim_stat* 127struct zone_reclaim_stat*
129mem_cgroup_get_reclaim_stat_from_page(struct page *page); 128mem_cgroup_get_reclaim_stat_from_page(struct page *page);
130extern void mem_cgroup_print_oom_info(struct mem_cgroup *memcg, 129extern void mem_cgroup_print_oom_info(struct mem_cgroup *memcg,
@@ -343,8 +342,7 @@ mem_cgroup_inactive_file_is_low(struct mem_cgroup *memcg, struct zone *zone)
343} 342}
344 343
345static inline unsigned long 344static inline unsigned long
346mem_cgroup_zone_nr_lru_pages(struct mem_cgroup *memcg, int nid, int zid, 345mem_cgroup_get_lruvec_size(struct lruvec *lruvec, enum lru_list lru)
347 unsigned int lru_mask)
348{ 346{
349 return 0; 347 return 0;
350} 348}