linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: forbid lumpy-reclaim in shrink_active_list()
@ 2012-03-19  9:18 Konstantin Khlebnikov
  2012-03-19 14:35 ` Johannes Weiner
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Konstantin Khlebnikov @ 2012-03-19  9:18 UTC (permalink / raw)
  To: linux-mm, Andrew Morton, linux-kernel
  Cc: Rik van Riel, Hugh Dickins, Minchan Kim, Mel Gorman,
	Johannes Weiner, KAMEZAWA Hiroyuki

This patch reset 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 left over from earlier shrink_inactive_list().
Meanwhile, in age_active_anon() sc->reclaim_mode is totally zero.
So, current behavior is too complex and confusing, all this looks like bug.

In general, shrink_active_list() populate inactive list for next shrink_inactive_list().
Lumpy shring_inactive_list() isolate pages around choosen one from both active and
inactive lists. So, there no reasons for lumpy-isolation in shrink_active_list()

Proposed-by: Hugh Dickins <hughd@google.com>
Link: https://lkml.org/lkml/2012/3/15/583
Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
---
 mm/vmscan.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/mm/vmscan.c b/mm/vmscan.c
index 57d8ef6..ae83ca3 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1690,6 +1690,8 @@ static void shrink_active_list(unsigned long nr_to_scan,
 
 	lru_add_drain();
 
+	reset_reclaim_mode(sc);
+
 	if (!sc->may_unmap)
 		isolate_mode |= ISOLATE_UNMAPPED;
 	if (!sc->may_writepage)

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-03-21 11:45 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-19  9:18 [PATCH] mm: forbid lumpy-reclaim in shrink_active_list() Konstantin Khlebnikov
2012-03-19 14:35 ` Johannes Weiner
2012-03-19 17:40 ` Rik van Riel
2012-03-19 17:58   ` Konstantin Khlebnikov
2012-03-19 18:03     ` Rik van Riel
2012-03-19 20:05       ` Hugh Dickins
2012-03-19 20:14         ` Rik van Riel
2012-03-21 11:45         ` Mel Gorman
2012-03-21  0:28 ` Minchan Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).