memcg: use correct scan number at reclaim
authorKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Thu, 12 Mar 2009 21:31:36 +0000 (14:31 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 12 Mar 2009 23:20:24 +0000 (16:20 -0700)
Even when page reclaim is under mem_cgroup, # of scan page is determined by
status of global LRU. Fix that.

Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Cc: Balbir Singh <balbir@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/vmscan.c

index 6177e3b..e895171 100644 (file)
@@ -1469,7 +1469,7 @@ static void shrink_zone(int priority, struct zone *zone,
                int file = is_file_lru(l);
                int scan;
 
-               scan = zone_page_state(zone, NR_LRU_BASE + l);
+               scan = zone_nr_pages(zone, sc, l);
                if (priority) {
                        scan >>= priority;
                        scan = (scan * percent[file]) / 100;