mm: vmscan: convert global reclaim to per-memcg LRU lists
authorJohannes Weiner <[email protected]>
Fri, 13 Jan 2012 01:18:06 +0000 (17:18 -0800)
committerLinus Torvalds <[email protected]>
Fri, 13 Jan 2012 04:13:05 +0000 (20:13 -0800)
commitb95a2f2d486d0d768a92879c023a03757b9c7e58
tree4f07a63d7587131bd82c49e0d9ac124d057539fd
parentad2b8e601099a23dffffb53f91c18d874fe98854
mm: vmscan: convert global reclaim to per-memcg LRU lists

The global per-zone LRU lists are about to go away on memcg-enabled
kernels, global reclaim must be able to find its pages on the per-memcg
LRU lists.

Since the LRU pages of a zone are distributed over all existing memory
cgroups, a scan target for a zone is complete when all memory cgroups
are scanned for their proportional share of a zone's memory.

The forced scanning of small scan targets from kswapd is limited to
zones marked unreclaimable, otherwise kswapd can quickly overreclaim by
force-scanning the LRU lists of multiple memory cgroups.

Signed-off-by: Johannes Weiner <[email protected]>
Reviewed-by: KAMEZAWA Hiroyuki <[email protected]>
Reviewed-by: Michal Hocko <[email protected]>
Reviewed-by: Kirill A. Shutemov <[email protected]>
Cc: Daisuke Nishimura <[email protected]>
Cc: Balbir Singh <[email protected]>
Cc: Ying Han <[email protected]>
Cc: Greg Thelen <[email protected]>
Cc: Michel Lespinasse <[email protected]>
Cc: Rik van Riel <[email protected]>
Cc: Minchan Kim <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Hugh Dickins <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/vmscan.c