[PATCH 04/14] page-replace-activate_page.patch

From: Peter Zijlstra
Date: Fri Dec 30 2005 - 17:40:47 EST



From: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>

page-replace interface function:
page_replace_activate()

This function will modify the page state for a reference action.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>

include/linux/mm_page_replace.h | 4 ++++
mm/vmscan.c | 3 ++-
2 files changed, 6 insertions(+), 1 deletion(-)

Index: linux-2.6-git/include/linux/mm_page_replace.h
===================================================================
--- linux-2.6-git.orig/include/linux/mm_page_replace.h 2005-12-10 17:13:56.000000000 +0100
+++ linux-2.6-git/include/linux/mm_page_replace.h 2005-12-10 18:19:30.000000000 +0100
@@ -7,6 +7,10 @@
#include <linux/mm.h>

void __page_replace_insert(struct zone *, struct page *);
+static inline void page_replace_activate(struct page *page)
+{
+ SetPageActive(page);
+}

#endif /* __KERNEL__ */
#endif /* _LINUX_MM_PAGE_REPLACE_H */
Index: linux-2.6-git/mm/vmscan.c
===================================================================
--- linux-2.6-git.orig/mm/vmscan.c 2005-12-10 17:13:57.000000000 +0100
+++ linux-2.6-git/mm/vmscan.c 2005-12-10 18:19:34.000000000 +0100
@@ -33,6 +33,7 @@
#include <linux/cpuset.h>
#include <linux/notifier.h>
#include <linux/rwsem.h>
+#include <linux/mm_page_replace.h>

#include <asm/tlbflush.h>
#include <asm/div64.h>
@@ -573,7 +574,7 @@ static int shrink_list(struct list_head

switch(try_pageout(page, sc)) {
case PAGEOUT_ACTIVATE:
- SetPageActive(page);
+ page_replace_activate(page);
pgactivate++;
/* fall through */
case PAGEOUT_KEEP:
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/