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-Url: https://git.stricted.de/?a=commitdiff_plain;h=077cbc5864cd9188fa4c4e181e48ff58317e6400;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.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 d500b906746c..da7c3a2304a7 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.