[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20100630155506.GV16195@random.random>
Date: Wed, 30 Jun 2010 17:55:06 +0200
From: Andrea Arcangeli <aarcange@...hat.com>
To: Rik van Riel <riel@...hat.com>
Cc: akpm@...ux-foundation.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, kosaki.motohiro@...fujitsu.com
Subject: Re: [PATCH -mm] rmap: add exclusive page to private anon_vma on
swapin
On Wed, Jun 30, 2010 at 11:37:10AM -0400, Rik van Riel wrote:
> @@ -2714,10 +2715,11 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma,
> if ((flags & FAULT_FLAG_WRITE) && reuse_swap_page(page)) {
> pte = maybe_mkwrite(pte_mkdirty(pte), vma);
> flags &= ~FAULT_FLAG_WRITE;
> + exclusive = 1;
> }
Agreed. it's something I considered doing too but I deferred until I
figure out all the mess with ksm-copy. I'll test your patch but it
should make no practical difference to my workload.
I also had a patch in my queue that changes this path which I deferred
as well for now.
====
Subject: set VM_FAULT_WRITE in do_swap_page
From: Andrea Arcangeli <aarcange@...hat.com>
Set the flag if do_swap_page is decowing the page the same way do_wp_page would
too.
Signed-off-by: Andrea Arcangeli <aarcange@...hat.com>
---
diff --git a/mm/memory.c b/mm/memory.c
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -2673,6 +2686,7 @@ static int do_swap_page(struct mm_struct
if ((flags & FAULT_FLAG_WRITE) && reuse_swap_page(page)) {
pte = maybe_mkwrite(pte_mkdirty(pte), vma);
flags &= ~FAULT_FLAG_WRITE;
+ ret |= VM_FAULT_WRITE;
}
flush_icache_page(vma, page);
set_pte_at(mm, address, page_table, pte);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists