diff options
author | Konstantin Khlebnikov <khlebnikov@openvz.org> | 2012-03-21 19:34:17 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-21 20:55:00 -0400 |
commit | 1480de0340a8d5f094b74d7c4b902456c9a06903 (patch) | |
tree | 6a4c4d776b6475d8a35cb4632340227e8ab311c2 /mm | |
parent | 88f6b4c32e531dc5b06bd05144f790847a1fdaeb (diff) |
mm: forbid lumpy-reclaim in shrink_active_list()
Reset the reclaim mode in shrink_active_list() to RECLAIM_MODE_SINGLE |
RECLAIM_MODE_ASYNC. (sync/async sign is used only in shrink_page_list
and does not affect shrink_active_list)
Currenly shrink_active_list() sometimes works in lumpy-reclaim mode, if
RECLAIM_MODE_LUMPYRECLAIM is left over from an earlier
shrink_inactive_list(). Meanwhile, in age_active_anon()
sc->reclaim_mode is totally zero. So the current behavior is too
complex and confusing, and this looks like bug.
In general, shrink_active_list() populates the inactive list for the
next shrink_inactive_list(). Lumpy shring_inactive_list() isolates
pages around the chosen one from both the active and inactive lists.
So, there is no reason for lumpy isolation in shrink_active_list().
See also: https://lkml.org/lkml/2012/3/15/583
Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Proposed-by: Hugh Dickins <hughd@google.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Cc: Rik van Riel <riel@redhat.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Mel Gorman <mgorman@suse.de>
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>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/vmscan.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c index 55d86c9506f3..49f15ef0a99a 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c | |||
@@ -1690,6 +1690,8 @@ static void shrink_active_list(unsigned long nr_to_scan, | |||
1690 | 1690 | ||
1691 | lru_add_drain(); | 1691 | lru_add_drain(); |
1692 | 1692 | ||
1693 | reset_reclaim_mode(sc); | ||
1694 | |||
1693 | if (!sc->may_unmap) | 1695 | if (!sc->may_unmap) |
1694 | isolate_mode |= ISOLATE_UNMAPPED; | 1696 | isolate_mode |= ISOLATE_UNMAPPED; |
1695 | if (!sc->may_writepage) | 1697 | if (!sc->may_writepage) |