Skip to content

powerpc/mm: page fault handler cleaning

Laurent Dufour linuxppc-dev lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3powerpc/mm: move mmap_sem unlock up from do_sigbusarch/powerpc/mm/fault.c+3 -32 replies
2/3powerpc/mm: handle VM_FAULT_RETRY earlierarch/powerpc/mm/fault.c+38 -292 replies
3/3powerpc/mm: move mmap_sem unlocking in do_page_fault()arch/powerpc/mm/fault.c+4 -151 reply

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchAneesh Kumar K.V
1/3R-b
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] powerpc/mm: page fault handler cleaning

This series attempts to clean the page fault handler in the way it has been done previously for the x86 architecture [1].

The goal is to manage the mmap_sem earlier and only in do_page_fault(). This done by handling the retry case earlier, before handling the error case. This way the semaphore can be released earlier and the error path processed without holding it.

The first patch is just moving a unlock to the caller of the service, which as no functional impact.

The second patch is handling the retry case earlier in do_page_fault(). This is where most the change are done, but I was conservative here, not changing the use of mm_fault_error() in the case of the second retry. It may be smarter to handle that case separately but this may create duplicate code.

The last patch is moving up semaphore releasing from mm_fault_error() to do_page_fault().

[1] see commits from Linus Torvalds
26178ec11ef3 ("x86: mm: consolidate VM_FAULT_RETRY handling") 7fb08eca4527 ("x86: mm: move mmap_sem unlock from mm_fault_error() to
caller")

Laurent Dufour (3):
powerpc/mm: move mmap_sem unlock up from do_sigbus powerpc/mm: handle VM_FAULT_RETRY earlier powerpc/mm: move mmap_sem unlocking in do_page_fault()

 arch/powerpc/mm/fault.c | 82 ++++++++++++++++++++++++-------------------------
 1 file changed, 40 insertions(+), 42 deletions(-)
Signature · 1 line
2.7.4