mm: save soft-dirty bits on file pages
Andy reported that if file page get reclaimed we lose the soft-dirty bit if it was there, so save _PAGE_BIT_SOFT_DIRTY bit when page address get encoded into pte entry. Thus when #pf happens on such non-present pte we can restore it back. Reported-by:Andy Lutomirski <luto@amacapital.net> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com> Cc: Matt Mackall <mpm@selenic.com> Cc: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com> Cc: Marcelo Tosatti <mtosatti@redhat.com> Cc: KOSAKI Motohiro <kosaki.motohiro@gmail.com> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Peter Zijlstra <peterz@infradead.org> Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> Cc: Minchan Kim <minchan@kernel.org> Cc: Wanpeng Li <liwanp@linux.vnet.ibm.com> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
Showing
- arch/x86/include/asm/pgtable-2level.h 47 additions, 1 deletionarch/x86/include/asm/pgtable-2level.h
- arch/x86/include/asm/pgtable-3level.h 3 additions, 0 deletionsarch/x86/include/asm/pgtable-3level.h
- arch/x86/include/asm/pgtable.h 15 additions, 0 deletionsarch/x86/include/asm/pgtable.h
- arch/x86/include/asm/pgtable_types.h 3 additions, 1 deletionarch/x86/include/asm/pgtable_types.h
- fs/proc/task_mmu.c 2 additions, 0 deletionsfs/proc/task_mmu.c
- include/asm-generic/pgtable.h 15 additions, 0 deletionsinclude/asm-generic/pgtable.h
- mm/fremap.c 8 additions, 3 deletionsmm/fremap.c
- mm/memory.c 8 additions, 3 deletionsmm/memory.c
- mm/rmap.c 6 additions, 2 deletionsmm/rmap.c
Please register or sign in to comment