* [PATCH/RFC] Migrate-on-fault prototype 4/5 V0.1 - handle misplaced anon pages
@ 2006-03-09 18:29 Lee Schermerhorn
2006-03-09 21:48 ` Lee Schermerhorn
0 siblings, 1 reply; 2+ messages in thread
From: Lee Schermerhorn @ 2006-03-09 18:29 UTC (permalink / raw)
To: linux-mm; +Cc: Christoph Lameter
Migrate-on-fault prototype 4/5 V0.1 - handle misplaced anon pages
This patch simply hooks the anon page fault handler [do_swap_page()]
to check for and migrate misplaced pages.
File and shmem fault paths will be addressed in separate patches.
Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Index: linux-2.6.16-rc5-git8/mm/memory.c
===================================================================
--- linux-2.6.16-rc5-git8.orig/mm/memory.c 2006-03-06 13:40:48.000000000
-0500
+++ linux-2.6.16-rc5-git8/mm/memory.c 2006-03-07 08:53:30.000000000
-0500
@@ -48,6 +48,7 @@
#include <linux/rmap.h>
#include <linux/module.h>
#include <linux/init.h>
+#include <linux/mempolicy.h> /* check_migrate_misplaced_page() */
#include <asm/pgalloc.h>
#include <asm/uaccess.h>
@@ -1926,6 +1927,8 @@ again:
/* The page isn't present yet, go ahead with the fault. */
+ page = check_migrate_misplaced_page(page, vma, address);
+
inc_mm_counter(mm, anon_rss);
pte = mk_pte(page, vma->vm_page_prot);
if (write_access && can_share_swap_page(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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH/RFC] Migrate-on-fault prototype 4/5 V0.1 - handle misplaced anon pages
2006-03-09 18:29 [PATCH/RFC] Migrate-on-fault prototype 4/5 V0.1 - handle misplaced anon pages Lee Schermerhorn
@ 2006-03-09 21:48 ` Lee Schermerhorn
0 siblings, 0 replies; 2+ messages in thread
From: Lee Schermerhorn @ 2006-03-09 21:48 UTC (permalink / raw)
To: linux-mm; +Cc: Christoph Lameter
On Thu, 2006-03-09 at 13:29 -0500, Lee Schermerhorn wrote:
> Migrate-on-fault prototype 4/5 V0.1 - handle misplaced anon pages
Resend #4:
Migrate-on-fault prototype 4/5 V0.1 - handle misplaced anon pages
This patch simply hooks the anon page fault handler [do_swap_page()]
to check for and migrate misplaced pages.
File and shmem fault paths will be addressed in separate patches.
Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Index: linux-2.6.16-rc5-git8/mm/memory.c
===================================================================
--- linux-2.6.16-rc5-git8.orig/mm/memory.c 2006-03-06 13:40:48.000000000 -0500
+++ linux-2.6.16-rc5-git8/mm/memory.c 2006-03-07 08:53:30.000000000 -0500
@@ -48,6 +48,7 @@
#include <linux/rmap.h>
#include <linux/module.h>
#include <linux/init.h>
+#include <linux/mempolicy.h> /* check_migrate_misplaced_page() */
#include <asm/pgalloc.h>
#include <asm/uaccess.h>
@@ -1926,6 +1927,8 @@ again:
/* The page isn't present yet, go ahead with the fault. */
+ page = check_migrate_misplaced_page(page, vma, address);
+
inc_mm_counter(mm, anon_rss);
pte = mk_pte(page, vma->vm_page_prot);
if (write_access && can_share_swap_page(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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-03-09 21:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-09 18:29 [PATCH/RFC] Migrate-on-fault prototype 4/5 V0.1 - handle misplaced anon pages Lee Schermerhorn
2006-03-09 21:48 ` Lee Schermerhorn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox