From: KOSAKI Motohiro Date: Tue, 6 Jan 2009 22:39:42 +0000 (-0800) Subject: memcg: reclaim shouldn't change zone->recent_rotated statistics X-Git-Tag: v2.6.29-rc1~442 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=077cbc5864cd9188fa4c4e181e48ff58317e6400;p=linux-2.6-omap-h63xx.git memcg: reclaim shouldn't change zone->recent_rotated statistics memcg reclaim shouldn't change zone->recent_rotated statistics. If memcgroup reclaim changes zone statistics, global reclaim can get a bit confused. Signed-off-by: KOSAKI Motohiro Acked-by: Rik van Riel Cc: Balbir Singh Cc: KAMEZAWA Hiroyuki Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/vmscan.c b/mm/vmscan.c index d500b906746..da7c3a2304a 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -1246,7 +1246,8 @@ static void shrink_active_list(unsigned long nr_pages, struct zone *zone, * This helps balance scan pressure between file and anonymous * pages in get_scan_ratio. */ - zone->recent_rotated[!!file] += pgmoved; + if (scan_global_lru(sc)) + zone->recent_rotated[!!file] += pgmoved; /* * Move the pages to the [file or anon] inactive list.