Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp72585pxk; Fri, 11 Sep 2020 00:13:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyQ4BGmkgPcnMEWeQiVlYS726yKOCtR7R9HlR//QxpmuS9F5BXNFNlizOKQ9ELPwjq2a0W4 X-Received: by 2002:a17:906:bc52:: with SMTP id s18mr689204ejv.398.1599808389246; Fri, 11 Sep 2020 00:13:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599808389; cv=none; d=google.com; s=arc-20160816; b=L6Upr6ER3gLck3JkDG/6qQv/3UQI/IAWlqoy1FsXDP37yEhJUSog5YrWvQmajBeq/l 1irr6QAMdyPv4QduNpP/yxPc5BNPAuDKdw9EHCjWZF+SpOz0Jw9pT3YUlYL4zYLgP88/ w5Zx6QXnLTXs9bqqlSTH6fJT3DI4CAQ7JoTq4oT4dz0wpHn8js8ef66nKpnp/+SuSItC Rn7HG/SVa6/2yPd9zhp6ANryxUEiqXtOnMHXWw9ZBnPqlgBdR0FKD9Ej+fdVtoMw0ced UkQEiqi4EcGve+XYy2zdlhp7E+POrgSGxapIouhJ7F4Ci/69vocBSLNi3nRHpdrh1+6C b0NQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=l8KDsrY39924ACHw1Sx+CBM/Dlp985coTimHrE9LjSo=; b=kgTALff/50Jf+nKhz6CUQCb9bJNcl52WjpAavp3dEiPT0xvB2U5eWr0MM6kLC70lEQ dIyUPZtUy4qUYwWSobDNf7vXSOiuUMGTc7a4pmalA3vCyxjSmMjkH9nDFSnIMJFlVO77 D44RL8n6rxcbMLqNufbtT52EhGjNLuLq4ZXexb67TsVuZ/jEdhVskF74EdSrsRqn6uX6 OpdtsVRZi7M7jJ5/C0rdfJqYYdIlW8KlcUXg8+QO61BdNTeEuuYt/SOftiRbd1zbd8zl ADV9rHp8lPTRLH8qEp0blh+KUbXoWFN1E1kyaWZG1MpKlN7raTkyiJAOnR2hQKtayuq0 crWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=PPlUR0zb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j14si701618edp.315.2020.09.11.00.12.46; Fri, 11 Sep 2020 00:13:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=PPlUR0zb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725811AbgIKHLO (ORCPT + 99 others); Fri, 11 Sep 2020 03:11:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725468AbgIKHLK (ORCPT ); Fri, 11 Sep 2020 03:11:10 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3AD37C061573; Fri, 11 Sep 2020 00:11:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=l8KDsrY39924ACHw1Sx+CBM/Dlp985coTimHrE9LjSo=; b=PPlUR0zbTWPpH3hH0mqS5h+JtM R5WAVd9k68mxD195MB+izkmVzegbgPHsNwoqeWstbxpVQHOwYZt738fosFRddXnq7lM9LjNVOpgvf aHBt9Xv5geb9jIoXqmdd2+LCOdR3Esazwp6p1vrYqwcM7XgZhLdCU6BK8TWb6jDTqASDjRgb+LMkw DZdWCVrkMw1VSc3l/jkU1F4485cXb4zGr0GCfbJ1jWedoC3gMPDoeS5Iuj5/Hkwqs1iQJynSYBvtG y2Ljxas1gnPytmadt8Wy0oXAjuDpumpxpJONTdFo6plfIvfIwYgF99B3FDj1nFhOuVH/V2PMbPGxF mMa23LxQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kGdBn-00017e-8d; Fri, 11 Sep 2020 07:09:43 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id E745E3003D8; Fri, 11 Sep 2020 09:09:39 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id A72E82C2AEBC1; Fri, 11 Sep 2020 09:09:39 +0200 (CEST) Date: Fri, 11 Sep 2020 09:09:39 +0200 From: peterz@infradead.org To: Jason Gunthorpe Cc: Linus Torvalds , Gerald Schaefer , Alexander Gordeev , Dave Hansen , John Hubbard , LKML , linux-mm , linux-arch , Andrew Morton , Russell King , Mike Rapoport , Catalin Marinas , Will Deacon , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Jeff Dike , Richard Weinberger , Dave Hansen , Andy Lutomirski , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Arnd Bergmann , Andrey Ryabinin , linux-x86 , linux-arm , linux-power , linux-sparc , linux-um , linux-s390 , Vasily Gorbik , Heiko Carstens , Christian Borntraeger , Claudio Imbrenda Subject: Re: [RFC PATCH v2 1/3] mm/gup: fix gup_fast with dynamic page table folding Message-ID: <20200911070939.GB1362448@hirez.programming.kicks-ass.net> References: <20200909192534.442f8984@thinkpad> <20200909180324.GI87483@ziepe.ca> <20200910093925.GB29166@oc3871087118.ibm.com> <20200910181319.GO87483@ziepe.ca> <20200910211010.46d064a7@thinkpad> <20200910215921.GP87483@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200910215921.GP87483@ziepe.ca> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 10, 2020 at 06:59:21PM -0300, Jason Gunthorpe wrote: > So, I suggest pXX_offset_unlocked() Urgh, no. Elsewhere in gup _unlocked() means it will take the lock itself (get_user_pages_unlocked()) -- although often it seems to mean the lock is already held (git grep _unlocked and marvel). What we want is _lockless().