linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH]: VM 8/8 shrink_list(): set PG_reclaimed
@ 2005-04-17 17:38 Nikita Danilov
  2005-04-18  1:13 ` Nick Piggin
  2005-04-26  4:29 ` Andrew Morton
  0 siblings, 2 replies; 9+ messages in thread
From: Nikita Danilov @ 2005-04-17 17:38 UTC (permalink / raw)
  To: linux-mm; +Cc: Andrew Morton

set PG_reclaimed bit on pages that are under writeback when shrink_list()
looks at them: these pages are at end of the inactive list, and it only makes
sense to reclaim them as soon as possible when writeout finishes.

Signed-off-by: Nikita Danilov <nikita@clusterfs.com>


 mm/vmscan.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletion(-)

diff -puN mm/vmscan.c~SetPageReclaimed-inactive-tail mm/vmscan.c
--- bk-linux/mm/vmscan.c~SetPageReclaimed-inactive-tail	2005-04-17 17:52:53.000000000 +0400
+++ bk-linux-nikita/mm/vmscan.c	2005-04-17 17:52:53.000000000 +0400
@@ -556,8 +556,11 @@ static int shrink_list(struct list_head 
 		if (page_mapped(page) || PageSwapCache(page))
 			sc->nr_scanned++;
 
-		if (PageWriteback(page))
+		if (PageWriteback(page)) {
+			if (!PageReclaim(page))
+				SetPageReclaim(page);
 			goto keep_locked;
+		}
 
 		referenced = page_referenced(page, 1, sc->priority <= 0);
 		/* In active use or really unfreeable?  Activate it. */

_
--
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/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>

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

end of thread, other threads:[~2005-04-26 10:32 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-17 17:38 [PATCH]: VM 8/8 shrink_list(): set PG_reclaimed Nikita Danilov
2005-04-18  1:13 ` Nick Piggin
2005-04-18 16:18   ` Nikita Danilov
2005-04-26  4:29 ` Andrew Morton
2005-04-26  5:27   ` Nick Piggin
2005-04-26  5:48     ` Nick Piggin
2005-04-26 10:16   ` Nikita Danilov
2005-04-26 10:29     ` Andrew Morton
2005-04-26 10:32     ` Nick Piggin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox