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://review.tizen.org/git/?a=commitdiff_plain;h=077cbc5864cd9188fa4c4e181e48ff58317e6400;p=profile%2Fivi%2Fkernel-x86-ivi.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 d500b90..da7c3a2 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.