Skip to content

Commit

Permalink
memcg: reclaim shouldn't change zone->recent_rotated statistics
Browse files Browse the repository at this point in the history
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 <kosaki.motohiro@jp.fujitsu.com>
Acked-by: Rik van Riel <riel@redhat.com>
Cc: Balbir Singh <balbir@in.ibm.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
kosaki authored and torvalds committed Jan 6, 2009
1 parent b962716 commit 077cbc5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mm/vmscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 077cbc5

Please sign in to comment.