linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] unlazy page movement
@ 2001-08-14  3:19 Rik van Riel
  0 siblings, 0 replies; only message in thread
From: Rik van Riel @ 2001-08-14  3:19 UTC (permalink / raw)
  To: Alan Cox; +Cc: linux-mm

Hi Alan,

since the VM balancing just about depends on the fact that
the pages it encounters on the inactive_clean list really
are freeable, here is a small patch to unlazy the queue
movement whenever we touch inactive page cache pages.

Please consider applying for the next -ac kernel.

thanks,

Rik
--
IA64: a worthy successor to i860.


--- filemap.c.orig	Mon Aug 13 14:19:58 2001
+++ filemap.c	Tue Aug 14 00:09:14 2001
@@ -353,8 +353,16 @@
 		if (page->index == offset)
 			break;
 	}
-	/* Mark the page referenced, kswapd will find it later. */
-	SetPageReferenced(page);
+	/*
+	 * Mark the page referenced so kswapd knows to up page->age
+	 * the next VM scan. Make sure to move inactive pages to the
+	 * active list so we don't get a nasty surprise when the pages
+	 * we thought were freeable aren't...
+	 */
+	if (PageActive(page))
+		SetPageReferenced(page);
+	else
+		activate_page(page);

 not_found:
 	return page;

--
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/

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-08-14  3:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-14  3:19 [PATCH] unlazy page movement Rik van Riel

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