vmscan: reclaim at order 0 when compaction is enabled
authorRik van Riel <[email protected]>
Wed, 21 Mar 2012 23:33:51 +0000 (16:33 -0700)
committerLinus Torvalds <[email protected]>
Thu, 22 Mar 2012 00:54:56 +0000 (17:54 -0700)
commitfe2c2a106663130a5ab45cb0e3414b52df2fff0c
tree4c2651ee4e33c73069bc41fa936b5227c9d9f2a9
parent67f96aa252e606cdf6c3cf1032952ec207ec0cf0
vmscan: reclaim at order 0 when compaction is enabled

When built with CONFIG_COMPACTION, kswapd should not try to free
contiguous pages, because it is not trying hard enough to have a real
chance at being successful, but still disrupts the LRU enough to break
other things.

Do not do higher order page isolation unless we really are in lumpy
reclaim mode.

Stop reclaiming pages once we have enough free pages that compaction can
deal with things, and we hit the normal order 0 watermarks used by kswapd.

Also remove a line of code that increments balanced right before exiting
the function.

Signed-off-by: Rik van Riel <[email protected]>
Cc: Andrea Arcangeli <[email protected]>
Acked-by: Mel Gorman <[email protected]>
Cc: Johannes Weiner <[email protected]>
Cc: Minchan Kim <[email protected]>
Cc: KOSAKI Motohiro <[email protected]>
Cc: Hillf Danton <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/vmscan.c