Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2102406rwd; Fri, 26 May 2023 01:32:46 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4HiHPhnaUxBzIvqGKlAu9WNhZ9pAoz1Kh6Wgp4twQ/Awh8sYN3RExBTUtoLR4ZCk2XIxhz X-Received: by 2002:a17:902:e847:b0:1af:d3b2:4eb7 with SMTP id t7-20020a170902e84700b001afd3b24eb7mr2008196plg.21.1685089966274; Fri, 26 May 2023 01:32:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685089966; cv=none; d=google.com; s=arc-20160816; b=MtZ+kTLupqDYWYOnnE6PAicBgv1KiaylrqLBWbJh897SZHAd7IeNhhfnTBoA2GU53l VUer0LKT141qiRcfDrSt8mOrt2YHQtWC2Q4BEq5++ANqz0+23CElBSAHzfmfLXguNrpX pU982VClu3j5j8dfJCy6HCma0tD372ISaPGc8dVX2QIwtFh5onSShWuEX7/1kl9IlvLA kP2zxW6v5sd1KGicxNBL27arQSQQloor8pTH+5DrAWSYqpgC96H3gEbL5ynukZDq2NVp S1clkyWTNGU8vmr6RwFVvn1DXaTZY1VyvvgbCnHZ3i8YrIx2qoM0awid76SI4ANFTHMi ITew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Z0fK4mm2FXMJr87PqpFQg/otvRM35WQQChLJtGkFULo=; b=bjJoMG9y0qzUpc14YTmXgCtWwkoKKiRIPuDFxQKiQp+95mxzTZMY1VUAjGdHWY0gvm Qipvrn6tMtauaoxoCfVGwT/FCx+JBMGF2vQVmpap3GXlGALN6zJUzwkfLa3O2t5nRdhg s5PqABDbZ5eRIxMNJqqGhrlKSLJWkCqaSBCreVkLyWAw909qca3wpjdyoQn9w8Y54wNh bnfKU70tUgtaSLsgn6ZS3X3mmJ8Ni+9vzhG0OEiHS/f6A3Kp4pCdsUvctAy997ciLFRa 10ArUu4BfEIzxPKoHdsSVoEdalhL7tnzgqXRmPBJmxXQDIZoLwZEStr1e7E9KcR+t9iA sFoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=snRLEoo+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g12-20020a170902c38c00b001adec0d4391si1228866plg.48.2023.05.26.01.32.32; Fri, 26 May 2023 01:32:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=snRLEoo+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242378AbjEZI0O (ORCPT + 99 others); Fri, 26 May 2023 04:26:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33528 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229981AbjEZI0M (ORCPT ); Fri, 26 May 2023 04:26:12 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0FEA7D8; Fri, 26 May 2023 01:26:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; 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=Z0fK4mm2FXMJr87PqpFQg/otvRM35WQQChLJtGkFULo=; b=snRLEoo+C6lUyaPMnG6OQwFJQv aXzI9MFe8MXCqXRNCOaOTrbhJ49b2cTR8pjMQuwCPEdp9Tixb3bC3ApDBc9RbwAXmiFqa2zqpF8E4 w7m0lSQWnlqjMYeTtfSZPDkO2yzQisapVSs6SMg/7kdXvdjbEGcAGBMaNDI3OF8GibRO7d713ocL3 Rv4DdXy81PkM9H3CO3h1znvZuAybWZy4w/Yz5z6g2gFuHOediaVT8p66rZeq813viQzhYE5R+X7EO Or67cCPgG0BdOSIkOp5EX/OFATiR4PJo+W+DpebrLYhc7KRSQlXFXNE9kdaSvJJtWKDa2EZaDaLXH hX6eDANw==; Received: from hch by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1q2Sls-001bLV-2l; Fri, 26 May 2023 08:26:00 +0000 Date: Fri, 26 May 2023 01:26:00 -0700 From: Christoph Hellwig To: David Howells Cc: Christoph Hellwig , David Hildenbrand , Jens Axboe , Al Viro , Matthew Wilcox , Jan Kara , Jeff Layton , Jason Gunthorpe , Logan Gunthorpe , Hillf Danton , Christian Brauner , Linus Torvalds , linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Andrew Morton Subject: Re: [RFC PATCH v2 3/3] block: Use iov_iter_extract_pages() and page pinning in direct-io.c Message-ID: References: <20230525223953.225496-1-dhowells@redhat.com> <20230525223953.225496-4-dhowells@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230525223953.225496-4-dhowells@redhat.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 25, 2023 at 11:39:53PM +0100, David Howells wrote: > Change the old block-based direct-I/O code to use iov_iter_extract_pages() > to pin user pages or leave kernel pages unpinned rather than taking refs > when submitting bios. > > This makes use of the preceding patches to not take pins on the zero page > (thereby allowing insertion of zero pages in with pinned pages) and to get > additional pins on pages, allowing an extracted page to be used in multiple > bios without having to re-extract it. I'm not seeing where we skip the unpin of the zero page, as commented in patch 1 (but maybe I'm not reviewing carefully enough as I'm at a conference right now). Otherwise my only rather cosmetic comment right now is that I'd called the "need_unpin" member is_pinned.