path: root/mm/process_vm_access.c
diff options
authorPeter Xu <>2020-08-11 18:38:57 -0700
committerLinus Torvalds <>2020-08-12 10:58:04 -0700
commita2beb5f1efede6924a4258462a5660572e6ca864 (patch)
tree7bc764d970b42ca4251dc1a95156ab028e470440 /mm/process_vm_access.c
parent484e51e4af528a408b8e0f2db4865625169279cf (diff)
mm: clean up the last pieces of page fault accountings
Here're the last pieces of page fault accounting that were still done outside handle_mm_fault() where we still have regs==NULL when calling handle_mm_fault(): arch/powerpc/mm/copro_fault.c: copro_handle_mm_fault arch/sparc/mm/fault_32.c: force_user_fault arch/um/kernel/trap.c: handle_page_fault mm/gup.c: faultin_page fixup_user_fault mm/hmm.c: hmm_vma_fault mm/ksm.c: break_ksm Some of them has the issue of duplicated accounting for page fault retries. Some of them didn't do the accounting at all. This patch cleans all these up by letting handle_mm_fault() to do per-task page fault accounting even if regs==NULL (though we'll still skip the perf event accountings). With that, we can safely remove all the outliers now. There's another functional change in that now we account the page faults to the caller of gup, rather than the task_struct that passed into the gup code. More information of this can be found at [1]. After this patch, below things should never be touched again outside handle_mm_fault(): - task_struct.[maj|min]_flt - PERF_COUNT_SW_PAGE_FAULTS_[MAJ|MIN] [1] Signed-off-by: Peter Xu <> Signed-off-by: Andrew Morton <> Cc: Albert Ou <> Cc: Alexander Gordeev <> Cc: Andy Lutomirski <> Cc: Benjamin Herrenschmidt <> Cc: Borislav Petkov <> Cc: Brian Cain <> Cc: Catalin Marinas <> Cc: Christian Borntraeger <> Cc: Chris Zankel <> Cc: Dave Hansen <> Cc: David S. Miller <> Cc: Geert Uytterhoeven <> Cc: Gerald Schaefer <> Cc: Greentime Hu <> Cc: Guo Ren <> Cc: Heiko Carstens <> Cc: Helge Deller <> Cc: H. Peter Anvin <> Cc: Ingo Molnar <> Cc: Ivan Kokshaysky <> Cc: James E.J. Bottomley <> Cc: John Hubbard <> Cc: Jonas Bonn <> Cc: Ley Foon Tan <> Cc: "Luck, Tony" <> Cc: Matt Turner <> Cc: Max Filippov <> Cc: Michael Ellerman <> Cc: Michal Simek <> Cc: Nick Hu <> Cc: Palmer Dabbelt <> Cc: Paul Mackerras <> Cc: Paul Walmsley <> Cc: Pekka Enberg <> Cc: Peter Zijlstra <> Cc: Richard Henderson <> Cc: Rich Felker <> Cc: Russell King <> Cc: Stafford Horne <> Cc: Stefan Kristiansson <> Cc: Thomas Bogendoerfer <> Cc: Thomas Gleixner <> Cc: Vasily Gorbik <> Cc: Vincent Chen <> Cc: Vineet Gupta <> Cc: Will Deacon <> Cc: Yoshinori Sato <> Link: Signed-off-by: Linus Torvalds <>
Diffstat (limited to 'mm/process_vm_access.c')
0 files changed, 0 insertions, 0 deletions