From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3vN7ZV2MgszDqJL for ; Wed, 15 Feb 2017 03:45:21 +1100 (AEDT) Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v1EGj0Mo019422 for ; Tue, 14 Feb 2017 11:45:19 -0500 Received: from e06smtp15.uk.ibm.com (e06smtp15.uk.ibm.com [195.75.94.111]) by mx0a-001b2d01.pphosted.com with ESMTP id 28m0eexy99-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 14 Feb 2017 11:45:19 -0500 Received: from localhost by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 14 Feb 2017 16:45:16 -0000 From: Laurent Dufour To: mpe@ellerman.id.au, benh@kernel.crashing.org, paulus@samba.org, aneesh.kumar@linux.vnet.ibm.com, bsingharora@gmail.com, npiggin@gmail.com Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/3] powerpc/mm: page fault handler cleaning Date: Tue, 14 Feb 2017 17:45:09 +0100 Message-Id: List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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