Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp5779600ioo; Wed, 1 Jun 2022 12:25:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJynpJEIj5HgV77l4FCOBRdGO6lMP/fl+jKtyZ9TY2PxDepK43Vjq0kTd5wWqeClp65fUgiO X-Received: by 2002:a17:90b:4a8e:b0:1e4:e2bd:7ff1 with SMTP id lp14-20020a17090b4a8e00b001e4e2bd7ff1mr4714320pjb.58.1654111526997; Wed, 01 Jun 2022 12:25:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654111526; cv=none; d=google.com; s=arc-20160816; b=e97qdIHlmM8IEjfbm+6Hm6YFhJSwcGNAIBU1ucWYPOxYj09U5h4O+ksrVzTCCISHNH 6zvP8cXMiRXvyGwqRQPsMroGGo2lS8hkA15GGWRURlU1yCrca77BcobkzQe/oUuFzaYp C5MchvUNiX3boQ6+sCcittMGJKTCcXE7Up6wZIMhdsoHzuydPlWVzEHZZ1MRpXqI2fTJ aEs9R63pOYoCOX/TcRdMaIk4C2D2d0p25046e77Nt7gDTnG8RhJOuaS1jJtcND6SEjb1 O6D8+Ni8RmImjQDADO/KDVffGUqCfUS0x2rrhC7xCjxdoaz/Ir9/E6t4Mwflc3JcwnxH GvFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=zWsM7Ygq4Q0deaAFt39w28RqifR6/a/rGCsOhQGtERg=; b=do5OCXywRN//2bxkJcRhyFaiwREXqYWnxmhA9mv1oxiAupY72TT5NHuAJbY87+wTOZ zFBnzSysC8bTp06WBMXmOn5XFypgy/YpH9BldeEqhXxLiVq1ASRKvtCLe/BgzAY58TOM EeETJKWcclgtTPM5JaRIndk3IFV5k6H7pMLLaTkF3sk9ie3vPSh1ds2hZc/BtaBi6PAV PhurnkH5TUMHB1wtsuAKjVVQ0OIfqSjKCQhZd1tuDRKL0u+kwQ5b5E39TC2YhMmOidYd WO9+2d/v/yYawZgud/MYBdgqu8i/cRfx0YmBzjEHolrRHqMYS2xW3jljulgcaDbIXJ8S bZZQ== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id c12-20020a655a8c000000b003fbbafcb7ebsi3092969pgt.496.2022.06.01.12.25.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 12:25:26 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A7B23169E08; Wed, 1 Jun 2022 11:58:30 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237722AbiE3Ntf (ORCPT + 99 others); Mon, 30 May 2022 09:49:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237557AbiE3Nn1 (ORCPT ); Mon, 30 May 2022 09:43:27 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 106C89AE40; Mon, 30 May 2022 06:32:09 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6C90260F5E; Mon, 30 May 2022 13:32:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 83CBBC385B8; Mon, 30 May 2022 13:31:55 +0000 (UTC) Date: Mon, 30 May 2022 14:31:52 +0100 From: Catalin Marinas To: Peter Xu Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Will Deacon , Matt Turner , linux-s390@vger.kernel.org, Andrew Morton , Brian Cain , Borislav Petkov , linux-alpha@vger.kernel.org, Alistair Popple , Jonas Bonn , linux-arm-kernel@lists.infradead.org, linux-ia64@vger.kernel.org, Michael Ellerman , Stefan Kristiansson , linux-snps-arc@lists.infradead.org, Vineet Gupta , Vasily Gorbik , Vlastimil Babka , Ivan Kokshaysky , Rich Felker , sparclinux@vger.kernel.org, Russell King , David Hildenbrand , Benjamin Herrenschmidt , Nicholas Piggin , "James E . J . Bottomley" , linux-xtensa@linux-xtensa.org, linux-sh@vger.kernel.org, Paul Walmsley , linux-m68k@lists.linux-m68k.org, linuxppc-dev@lists.ozlabs.org, Richard Henderson , Guo Ren , linux-parisc@vger.kernel.org, Andrea Arcangeli , Helge Deller , Al Viro , Albert Ou , linux-um@lists.infradead.org, "H . Peter Anvin" , Janosch Frank , Sven Schnelle , Anton Ivanov , openrisc@lists.librecores.org, Thomas Bogendoerfer , linux-hexagon@vger.kernel.org, Andy Lutomirski , Stafford Horne , linux-csky@vger.kernel.org, Heiko Carstens , Thomas Gleixner , linux-mips@vger.kernel.org, Paul Mackerras , Alexander Gordeev , Dinh Nguyen , Palmer Dabbelt , "David S . Miller" , Johannes Weiner , Hugh Dickins , Ingo Molnar , Peter Zijlstra , linux-riscv@lists.infradead.org, Max Filippov , Geert Uytterhoeven , Christian Borntraeger , Johannes Berg , Chris Zankel , Michal Simek , x86@kernel.org, Yoshinori Sato , Dave Hansen , Richard Weinberger , Ingo Molnar Subject: Re: [PATCH v4] mm: Avoid unnecessary page fault retires on shared memory types Message-ID: References: <20220527193936.30678-1-peterx@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220527193936.30678-1-peterx@redhat.com> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 27, 2022 at 03:39:36PM -0400, Peter Xu wrote: > diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c > index 77341b160aca..e401d416bbd6 100644 > --- a/arch/arm64/mm/fault.c > +++ b/arch/arm64/mm/fault.c > @@ -607,6 +607,10 @@ static int __kprobes do_page_fault(unsigned long far, unsigned int esr, > return 0; > } > > + /* The fault is fully completed (including releasing mmap lock) */ > + if (fault & VM_FAULT_COMPLETED) > + return 0; > + > if (fault & VM_FAULT_RETRY) { > mm_flags |= FAULT_FLAG_TRIED; > goto retry; For arm64: Acked-by: Catalin Marinas