All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] powerpc/mm: page fault handler cleaning
@ 2017-02-14 16:45 Laurent Dufour
  2017-02-14 16:45 ` [PATCH 1/3] powerpc/mm: move mmap_sem unlock up from do_sigbus Laurent Dufour
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Laurent Dufour @ 2017-02-14 16:45 UTC (permalink / raw)
  To: mpe, benh, paulus, aneesh.kumar, bsingharora, npiggin
  Cc: linuxppc-dev, linux-kernel

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(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2017-03-21 13:41 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-14 16:45 [PATCH 0/3] powerpc/mm: page fault handler cleaning Laurent Dufour
2017-02-14 16:45 ` [PATCH 1/3] powerpc/mm: move mmap_sem unlock up from do_sigbus Laurent Dufour
2017-03-21  8:39   ` Aneesh Kumar K.V
2017-03-21 11:36   ` [1/3] " Michael Ellerman
2017-02-14 16:45 ` [PATCH 2/3] powerpc/mm: handle VM_FAULT_RETRY earlier Laurent Dufour
2017-03-21  9:12   ` Aneesh Kumar K.V
2017-03-21  9:57     ` Laurent Dufour
2017-02-14 16:45 ` [PATCH 3/3] powerpc/mm: move mmap_sem unlocking in do_page_fault() Laurent Dufour
2017-03-21  9:12   ` Aneesh Kumar K.V
2017-03-02 12:30 ` [PATCH 0/3] powerpc/mm: page fault handler cleaning Laurent Dufour
2017-03-03 12:17   ` Michael Ellerman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.