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 6DCA6C433F5 for ; Thu, 20 Jan 2022 14:12:26 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C59C66B00A0; Thu, 20 Jan 2022 09:12:25 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C089D6B00A3; Thu, 20 Jan 2022 09:12:25 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AF7446B00A4; Thu, 20 Jan 2022 09:12:25 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0084.hostedemail.com [216.40.44.84]) by kanga.kvack.org (Postfix) with ESMTP id A0AC06B00A0 for ; Thu, 20 Jan 2022 09:12:25 -0500 (EST) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 63C1B95295 for ; Thu, 20 Jan 2022 14:12:25 +0000 (UTC) X-FDA: 79050855450.15.7656A1E Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by imf11.hostedemail.com (Postfix) with ESMTP id 0F92840008 for ; Thu, 20 Jan 2022 14:12:24 +0000 (UTC) Received: by verein.lst.de (Postfix, from userid 2407) id B904E68C4E; Thu, 20 Jan 2022 15:12:20 +0100 (CET) Date: Thu, 20 Jan 2022 15:12:19 +0100 From: Christoph Hellwig To: John Hubbard Cc: Matthew Wilcox , linux-kernel@vger.kernel.org, Christoph Hellwig , Jason Gunthorpe , Joao Martins , Logan Gunthorpe , Ming Lei , linux-block@vger.kernel.org, netdev@vger.kernel.org, linux-mm@kvack.org, linux-rdma@vger.kernel.org, dri-devel@lists.freedesktop.org, nvdimm@lists.linux.dev Subject: Re: Phyr Starter Message-ID: <20220120141219.GB11707@lst.de> References: <82989486-3780-f0aa-c13d-994e97d4ac89@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <82989486-3780-f0aa-c13d-994e97d4ac89@nvidia.com> User-Agent: Mutt/1.5.17 (2007-11-01) X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: 0F92840008 X-Stat-Signature: px5tu6j1a9gom9xchgfkb9wtacq1f8jb Authentication-Results: imf11.hostedemail.com; dkim=none; dmarc=none; spf=none (imf11.hostedemail.com: domain of hch@lst.de has no SPF policy when checking 213.95.11.211) smtp.mailfrom=hch@lst.de X-HE-Tag: 1642687944-173575 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000300, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Jan 11, 2022 at 12:17:18AM -0800, John Hubbard wrote: > Zooming in on the pinning aspect for a moment: last time I attempted to > convert O_DIRECT callers from gup to pup, I recall wanting very much to > record, in each bio_vec, whether these pages were acquired via FOLL_PIN, > or some non-FOLL_PIN method. Because at the end of the IO, it is not > easy to disentangle which pages require put_page() and which require > unpin_user_page*(). I don't think that is a problem. Pinning only need to happen for ITER_IOVEC, and the only non-user pages there is the ZERO_PAGE added for padding that can be special cased.