Re: [RFC patch] vm: clear swap entry before copying pte

2012-07-31 Thread Hillf Danton
Hi Hugh, On Tue, Jul 31, 2012 at 10:34 AM, Hugh Dickins wrote: > But I can see that the lack of reinitialization of entry.val here > does raise doubt and confusion. A better tidyup would be to remove > the initialization of swp_entry_t entry from its onstack declaration, > and do it at the again

Re: [RFC patch] vm: clear swap entry before copying pte

2012-07-30 Thread Hugh Dickins
On Fri, 27 Jul 2012, Hillf Danton wrote: > > If swap entry is cleared, we can see the reason that copying pte is > interrupted. If due to page table lock held long enough, no need to > increase swap count. I can't see a bug to be fixed here. How would it break out of the loop above without fresh

[RFC patch] vm: clear swap entry before copying pte

2012-07-27 Thread Hillf Danton
If swap entry is cleared, we can see the reason that copying pte is interrupted. If due to page table lock held long enough, no need to increase swap count. Signed-off-by: Hillf Danton --- --- a/mm/memory.c Fri Jul 27 21:33:32 2012 +++ b/mm/memory.c Fri Jul 27 21:35:24 2012 @@ -971,6