From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 65ADDECAAD1 for ; Thu, 1 Sep 2022 00:43:01 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D839C8D0002; Wed, 31 Aug 2022 20:43:00 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D0B358D0001; Wed, 31 Aug 2022 20:43:00 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B84248D0002; Wed, 31 Aug 2022 20:43:00 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id A280F8D0001 for ; Wed, 31 Aug 2022 20:43:00 -0400 (EDT) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 6D6B512054D for ; Thu, 1 Sep 2022 00:43:00 +0000 (UTC) X-FDA: 79861666920.28.5120CC0 Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [62.89.141.173]) by imf20.hostedemail.com (Postfix) with ESMTP id 20D6B1C0056 for ; Thu, 1 Sep 2022 00:42:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=C7e5gupx7uxhb230xCd10coToUBiCKDWQPIlevGdY80=; b=hOmLMP+ugUyeMF+6QA09PjcGfu 0tRtPHTBgl7z0s+0RBcR5HuECX6vysi72oyqb9nKg5wfcAeYH/E5qvTZmEwzNP02MAz3qPXJ2urMq QOEo7VxYgfOzukB5+Q1xXyGnNcYh1a5f1Ccjj4umz03kPQ8jMURb+pUCnQE0CQCv6lLQOzQmYKqLs Wjx2NxdOHt3j+kmpXPmv2ZJZKZWFhn7QqvE02d6Oenv6a0u53D681c/AL6Ll/H2pW8+77KFGmiFSo uefabYiIChsmUAUy82RL56+vUhGqlH10rlzlzMZwSYk+7CP8NtmpA4CSnqdXla4EwnXtAff+Ztcj8 HY+Qicmw==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.95 #2 (Red Hat Linux)) id 1oTYIA-00AnSf-7D; Thu, 01 Sep 2022 00:42:46 +0000 Date: Thu, 1 Sep 2022 01:42:46 +0100 From: Al Viro To: John Hubbard Cc: Andrew Morton , Jens Axboe , Miklos Szeredi , Christoph Hellwig , "Darrick J . Wong" , Trond Myklebust , Anna Schumaker , Jan Kara , David Hildenbrand , Logan Gunthorpe , linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org, linux-nfs@vger.kernel.org, linux-mm@kvack.org, LKML Subject: Re: [PATCH v2 4/7] iov_iter: new iov_iter_pin_pages*() routines Message-ID: References: <20220831041843.973026-1-jhubbard@nvidia.com> <20220831041843.973026-5-jhubbard@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220831041843.973026-5-jhubbard@nvidia.com> ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1661992980; a=rsa-sha256; cv=none; b=d3Hdm8jgAGzGjg90h2QV48h5rcHAw+8LQf2wTnbK4UKwL5yMo28mIqj1R1air0ChZDdZNs YDXGULdwAx7h8+sQ/ySYxw5dTqJlbG31Gjzo1lYaXwgZtMRqwjwGuhdNSiTLUR7zhvnhQ6 77hnhEiknKKKFKfcR1nMdhVi5q2lvvc= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=linux.org.uk header.s=zeniv-20220401 header.b=hOmLMP+u; spf=none (imf20.hostedemail.com: domain of viro@ftp.linux.org.uk has no SPF policy when checking 62.89.141.173) smtp.mailfrom=viro@ftp.linux.org.uk; dmarc=pass (policy=none) header.from=zeniv.linux.org.uk ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1661992980; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=C7e5gupx7uxhb230xCd10coToUBiCKDWQPIlevGdY80=; b=gB2hUJT3qTdmGbm7F7/hwICAgS1JE1iTREaT1UguUdXpl9/056IMEZSXzt83H5HJ86o0Jb af6qOmSG+hNLmQJZP0PoZqgXSXpPnAA7pPGetnW4knbLgumOu66UubCNpKFCu6yBR0wYj1 b61r2Xro/8lumgACrobzw575prejnio= X-Rspam-User: X-Stat-Signature: dqn5g8wjsyshqh5k864h5fmpbyiaa5xr X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 20D6B1C0056 Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=linux.org.uk header.s=zeniv-20220401 header.b=hOmLMP+u; spf=none (imf20.hostedemail.com: domain of viro@ftp.linux.org.uk has no SPF policy when checking 62.89.141.173) smtp.mailfrom=viro@ftp.linux.org.uk; dmarc=pass (policy=none) header.from=zeniv.linux.org.uk X-HE-Tag: 1661992979-2122 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Aug 30, 2022 at 09:18:40PM -0700, John Hubbard wrote: > Provide two new wrapper routines that are intended for user space pages > only: > > iov_iter_pin_pages() > iov_iter_pin_pages_alloc() > > Internally, these routines call pin_user_pages_fast(), instead of > get_user_pages_fast(), for user_backed_iter(i) and iov_iter_bvec(i) > cases. > > As always, callers must use unpin_user_pages() or a suitable FOLL_PIN > variant, to release the pages, if they actually were acquired via > pin_user_pages_fast(). > > This is a prerequisite to converting bio/block layers over to use > pin_user_pages_fast(). What of ITER_PIPE (splice from O_DIRECT fd to a to pipe, for filesystem that uses generic_file_splice_read())?