Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp1924483pxa; Sat, 29 Aug 2020 07:58:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwe1L7AKZnv87EZkyn7nP6F8y8OXaMTH/EUJKCfTu9ixSrJWfMsiltfu8Ek0urk3WAgvcoB X-Received: by 2002:a17:906:d144:: with SMTP id br4mr3762254ejb.385.1598713095900; Sat, 29 Aug 2020 07:58:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598713095; cv=none; d=google.com; s=arc-20160816; b=Qdtu/mXMaWC/zPljM6pdHoCtTNhf2i++PZZeYMrAbFm8T4/gUntDPokohA/yrgLikb 7vcC+rjW6gX24D/Mf4kJQgFRlLVhKo7/g9BxhX52uJM9jp45L9x10dJc3WhAzetj9hcD NbSHKH9igwkg8w8XW2c5W7ieuAzFh74zy3VNhxvNI/6fxHO6QP+1yzoDrQWV76+mYgy9 8B0HysQmg8BI2Gf30IjrWJjdHtK4V7rqshERRQv1taCn3r6Fx9p0Zj87nVQPN2SEey7/ vTsvdoMiROYYjwN4YmaMUt8RATSURWXTuaqAw86OsMUkt6MSJ6P7vEa4cAbAkQ7zdLl9 Axyw== 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=syK03Q4xXEA+proHGQgPtI7XNxH7nklSo+/fI2tk1Lg=; b=gqzoDPrSsoOc9s9fCZvN042ibiAYF2C4ShHVK+TBwUFCXtZuiH3Wk3Ni9gSUi34C6w kuHuQ2iJSrUD5+mg8FMvnemEy8DvcocbCNRBO5bdnld2ucdAxGw5v5xqwgdS5Defzt8y VUXUKNfnCQyH3y2ZcopMSqu4C/eX4rd9SUPxDN1nRve4Vcsr4HGA+tbnK31IFohnBR5H y8nAs5j9mVhIuMBckDk83oHX4cbeFAbgm7BWiXJZbQw2af8cEKRHXo597xh6VrTPF44E tUb+HnwUQVRxTED1QOHO1V+zzN6vYhbEIwaROx2hgxR+EE7GowdvIujkL9bCjtz9zpJF DoAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=L4h7n0OB; 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 u23si1572838edr.459.2020.08.29.07.57.51; Sat, 29 Aug 2020 07:58:15 -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=L4h7n0OB; 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 S1728254AbgH2Oyb (ORCPT + 99 others); Sat, 29 Aug 2020 10:54:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727772AbgH2Oya (ORCPT ); Sat, 29 Aug 2020 10:54:30 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CEE33C061236; Sat, 29 Aug 2020 07:54:29 -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=syK03Q4xXEA+proHGQgPtI7XNxH7nklSo+/fI2tk1Lg=; b=L4h7n0OBMl1O11DSPJ1oqOBPs+ P7AjbVhlfitS+eORwFs7L7+y5XHNfj17uhWgRVLDQydbz/Pvs2M89SIM20IzkCdlQiGfHhbabIo0f Ewd/PWS3YnToUrCZ/yX17vN1hiblN8YVFw6cES3zgKhWxtxOyaKtT4YCQ/jy+EqLZlzSUz74xbs9Q 5Q8CP+A5IJIx7uB8d/5c3uHEuSYgHSqsnn4+52xv4+OZS67L/hZmoOl+u8WxFPDpdmB2EnMnQAe7y MQ+GjMGbE1g5zPlbrlg8vmbB3EWL4FOSIp+Tmg6TPgC+eXesdeCRqTbYRDOPQEs+x5mxesAxavLuI y9j8ycFg==; Received: from hch by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kC2FJ-0003Nh-7c; Sat, 29 Aug 2020 14:54:21 +0000 Date: Sat, 29 Aug 2020 15:54:21 +0100 From: Christoph Hellwig To: John Hubbard Cc: Andrew Morton , Alexander Viro , Christoph Hellwig , Ilya Dryomov , Jens Axboe , linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, linux-mm@kvack.org, LKML Subject: Re: [PATCH v2 1/3] mm/gup: introduce pin_user_page() Message-ID: <20200829145421.GA12470@infradead.org> References: <20200829080853.20337-1-jhubbard@nvidia.com> <20200829080853.20337-2-jhubbard@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200829080853.20337-2-jhubbard@nvidia.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Aug 29, 2020 at 01:08:51AM -0700, John Hubbard wrote: > pin_user_page() is the FOLL_PIN equivalent of get_page(). > > This was always a missing piece of the pin/unpin API calls (early > reviewers of pin_user_pages() asked about it, in fact), but until now, > it just wasn't needed. Finally though, now that the Direct IO pieces in > block/bio are about to be converted to use FOLL_PIN, it turns out that > there are some cases in which get_page() and get_user_pages_fast() were > both used. Converting those sites requires a drop-in replacement for > get_page(), which this patch supplies. I find the name really confusing vs pin_user_pages*, as it suggests as single version of the same. It also seems partially wrong, at least in the direct I/O case as the only thing pinned here is the zero page. So maybe pin_kernel_page is a better name together with an explanation? Or just pin_page?