diff options
author | Konstantin Khlebnikov <khlebnikov@openvz.org> | 2012-05-29 18:07:00 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-29 19:22:26 -0400 |
commit | 074291fea8bcedeabf295360e2ddd9bbb5830b4a (patch) | |
tree | 01531a2ca7e9b648a4d8cd9bc772aa484ed2190d /include/linux | |
parent | 27ac81d85e5cfcc755dd5fa3f04dc883ab5d821b (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.h | 6 |
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, | |||
123 | int mem_cgroup_inactive_file_is_low(struct mem_cgroup *memcg, | 123 | int mem_cgroup_inactive_file_is_low(struct mem_cgroup *memcg, |
124 | struct zone *zone); | 124 | struct zone *zone); |
125 | int mem_cgroup_select_victim_node(struct mem_cgroup *memcg); | 125 | int mem_cgroup_select_victim_node(struct mem_cgroup *memcg); |
126 | unsigned long mem_cgroup_zone_nr_lru_pages(struct mem_cgroup *memcg, | 126 | unsigned long mem_cgroup_get_lruvec_size(struct lruvec *lruvec, enum lru_list); |
127 | int nid, int zid, unsigned int lrumask); | ||
128 | struct zone_reclaim_stat* | 127 | struct zone_reclaim_stat* |
129 | mem_cgroup_get_reclaim_stat_from_page(struct page *page); | 128 | mem_cgroup_get_reclaim_stat_from_page(struct page *page); |
130 | extern void mem_cgroup_print_oom_info(struct mem_cgroup *memcg, | 129 | extern 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 | ||
345 | static inline unsigned long | 344 | static inline unsigned long |
346 | mem_cgroup_zone_nr_lru_pages(struct mem_cgroup *memcg, int nid, int zid, | 345 | mem_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 | } |