From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752124AbdCBMbo (ORCPT ); Thu, 2 Mar 2017 07:31:44 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:39088 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751274AbdCBMbl (ORCPT ); Thu, 2 Mar 2017 07:31:41 -0500 Subject: Re: [PATCH 0/3] powerpc/mm: page fault handler cleaning To: mpe@ellerman.id.au, benh@kernel.crashing.org, paulus@samba.org, aneesh.kumar@linux.vnet.ibm.com, bsingharora@gmail.com, npiggin@gmail.com References: Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org From: Laurent Dufour Date: Thu, 2 Mar 2017 13:30:38 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 17030212-0016-0000-0000-0000044A9657 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17030212-0017-0000-0000-000026A39B32 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-03-02_10:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1612050000 definitions=main-1703020117 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Kindly ping... On 14/02/2017 17:45, Laurent Dufour wrote: > 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(-) >