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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B0631C433F5 for ; Thu, 20 Jan 2022 14:12:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345352AbiATOM2 (ORCPT ); Thu, 20 Jan 2022 09:12:28 -0500 Received: from verein.lst.de ([213.95.11.211]:44803 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345116AbiATOM0 (ORCPT ); Thu, 20 Jan 2022 09:12:26 -0500 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) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.