aboutsummaryrefslogtreecommitdiffstats
path: root/mm/vmscan.c
diff options
context:
space:
mode:
authorKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>2009-01-07 21:08:19 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-08 11:31:08 -0500
commita3d8e0549d913e30968fa02e505dfe02c0a23e0d (patch)
treee4d3df33666a18614289ae7bc76c27ad7950eb73 /mm/vmscan.c
parent14797e2363c2b2f1ce139fd1c5a215e4e05aa1d9 (diff)
memcg: add mem_cgroup_zone_nr_pages()
Introduce mem_cgroup_zone_nr_pages(). It is called by zone_nr_pages() helper function. This patch doesn't have any behavior change. Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Acked-by: Rik van Riel <riel@redhat.com> Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Acked-by: Balbir Singh <balbir@in.ibm.com> Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp> Cc: Hugh Dickins <hugh@veritas.com> Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/vmscan.c')
-rw-r--r--mm/vmscan.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c
index b2bc06bffcfb..d958d624d3ae 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -139,6 +139,9 @@ static struct zone_reclaim_stat *get_reclaim_stat(struct zone *zone,
139static unsigned long zone_nr_pages(struct zone *zone, struct scan_control *sc, 139static unsigned long zone_nr_pages(struct zone *zone, struct scan_control *sc,
140 enum lru_list lru) 140 enum lru_list lru)
141{ 141{
142 if (!scan_global_lru(sc))
143 return mem_cgroup_zone_nr_pages(sc->mem_cgroup, zone, lru);
144
142 return zone_page_state(zone, NR_LRU_BASE + lru); 145 return zone_page_state(zone, NR_LRU_BASE + lru);
143} 146}
144 147