Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp542741pxk; Sun, 30 Aug 2020 13:21:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyr1fGs1YLcqsvXpdAzcYo8NV+eX5FGYmQ3AOs/+IVpclBuQ+lyFmHV3HWpkYkL1LSOhmvZ X-Received: by 2002:a50:af83:: with SMTP id h3mr8667903edd.139.1598818859923; Sun, 30 Aug 2020 13:20:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598818859; cv=none; d=google.com; s=arc-20160816; b=mLQ/AUtKJrKcTY0Ks9TsmOCJOyW7yajQrIYfwPWvLXZ9ab9lWhdMn9u94cN0awSB9r PGitWnw8lCwQ5us7hc9r2aG7V595KH6NL7ve7iYb/28Q03nWaxpPYj0Dy+6DOPruB3T7 MmvKCanWxu3RPmfqWRo3mhkh6laWyyH58f1ZvTqDUii2bRVuQTFTgLQVvsZw1mhgJFL0 BndKJE3gS24trSvZgiBr7O+WpZo2xoTfTsP5YA5JReSinI6cLvFvEgANc5Z10WrnBM1a D8l0IJXMx2wUugl29BOcCy22Lcum+uv9RCoQgQMHUfCV/z+Ivz1xYYvOPR+BOf/owu5R fbAA== 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; bh=svWLWopVO8pIPzvwgOv/HeKSP+nNjVm9NtKoOVQJWHw=; b=H2ZQX/daaQiVMf0h3JhlxLdxHztmWhkUFw8PzC+a8zATrcPyVHFkzxYnncqh4jPT1s KzfXZc/DielaN7ca95FGaPOGBF2Yc6mXCD61yCrLgW9VIfNVSA01LKLPy3i5+dBcXVrt y3zqw2349QzHr5nm71MhGV80AHwzNHA6EQfjbW2KEaxRJPptzb4W+gwCl9qj6Yjs2L0L RvbT5SsCZJ76/ktjIqTZr933US+Plvi0TreUeu+ZIjrrcbFNRiXA7ng8ysLoZ91bBE6u k1jujBjok+ElUi87tAG3L9iNAJW/ftRp5h7i5OvKKawynGS0+i2CtMPx/mDQtbLimlMB N9XA== ARC-Authentication-Results: i=1; mx.google.com; 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 p6si3832720edh.431.2020.08.30.13.20.37; Sun, 30 Aug 2020 13:20:59 -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; 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 S1726521AbgH3URa (ORCPT + 99 others); Sun, 30 Aug 2020 16:17:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46012 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726155AbgH3UR3 (ORCPT ); Sun, 30 Aug 2020 16:17:29 -0400 Received: from ZenIV.linux.org.uk (zeniv.linux.org.uk [IPv6:2002:c35c:fd02::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 220CDC061573; Sun, 30 Aug 2020 13:17:29 -0700 (PDT) Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kCTlB-007hSE-66; Sun, 30 Aug 2020 20:17:05 +0000 Date: Sun, 30 Aug 2020 21:17:05 +0100 From: Al Viro To: John Hubbard Cc: Andrew Morton , 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 2/3] iov_iter: introduce iov_iter_pin_user_pages*() routines Message-ID: <20200830201705.GV1236603@ZenIV.linux.org.uk> References: <20200829080853.20337-1-jhubbard@nvidia.com> <20200829080853.20337-3-jhubbard@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200829080853.20337-3-jhubbard@nvidia.com> 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:52AM -0700, John Hubbard wrote: > The new routines are: > iov_iter_pin_user_pages() > iov_iter_pin_user_pages_alloc() > > and those correspond to these pre-existing routines: > iov_iter_get_pages() > iov_iter_get_pages_alloc() > > Also, pipe_get_pages() and related are changed so as to pass > down a "use_pup" (use pin_user_page() instead of get_page()) bool > argument. > > Unlike the iov_iter_get_pages*() routines, the > iov_iter_pin_user_pages*() routines assert that only ITER_IOVEC or > ITER_PIPE items are passed in. They then call pin_user_page*(), instead > of get_user_pages_fast() or get_page(). > > Why: In order to incrementally change Direct IO callers from calling > get_user_pages_fast() and put_page(), over to calling > pin_user_pages_fast() and unpin_user_page(), there need to be mid-level > routines that specifically call one or the other systems, for both page > acquisition and page release. Hmm... Do you plan to kill iov_iter_get_pages* off, eventually getting rid of that use_pup argument?