Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp4010564rwb; Tue, 6 Sep 2022 00:41:12 -0700 (PDT) X-Google-Smtp-Source: AA6agR45geCyuML1KnR5PBcAt17S8athd1CUyU3G6pERcViM5xZ3JG8A9VQrA402uPTvDps/8qbV X-Received: by 2002:a17:903:1248:b0:172:614b:234b with SMTP id u8-20020a170903124800b00172614b234bmr53515430plh.169.1662450072241; Tue, 06 Sep 2022 00:41:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662450072; cv=none; d=google.com; s=arc-20160816; b=yJ4mZklJojEm5Awgy8bHF74Z35X9FL2sM45svmZH0hObKejwCSmLe50kc0p1ERAv0u Y3p8jGGw9gn7aVaBxfoOhQ88ni90h5j9yPQxtO3uTSTkTg9hSrH8Hd6Faj72JHGUSNdC LS+KMoMN8qPTuPTvN4LErzXteFM7P8EKaD8Gium1GhsloHGj1/mOt2avv01Vn6YuwCBI RCPLZ62gJbwosfQBOUEBwYXd/MjKqZjtVN6yDvJfTZPF3DaAPBhTtbGOTPxqC0W0mAkn 3B5RJvJhpilBivZYeny22MPTj9Ux9uvCjmlZyahf9Nn7kjXGcIAkYPz8ZXOvIm0DV6Ck /TqA== 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=EHkWMjiSw6sMSHyk1j8ZDqGlGyNnE9pNuM0MT92Hdqk=; b=Gkteihv4zB7Y8jcov1QJ6Gj6G8Phr4UGFTK+vplwqugnxKBRMXYP/RaoVrUYf7/gSt GvMXBkwLvFdKeOzJMQU+3C8ttfay9aVciM0PkCPJfl51GdXwawBqrcaMtzDYY3lIcqcY /UeUKhfusVHe/RdCD+xAeO6tTZ+LMohuALtnNUWw6tS4TtRp2baH8cH/33/MtMk0kuXe PTj7ykBHUgG0707dKjADFpN9QLGg9+o5hqrDnijl8G56O2EP7cK9Lh/TZoZvKOROrgSk J9E1AwERIT9FmMP5u8xebbsUnwhQPjq9kqz4ZpMK4gUrY3AoU7sgy+K5ADB1su2xx/yO YNgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=sEDZ5Ujl; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-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 jb15-20020a170903258f00b00176ae70d99csi4909838plb.31.2022.09.06.00.40.59; Tue, 06 Sep 2022 00:41:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-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=sEDZ5Ujl; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231887AbiIFHWN (ORCPT + 99 others); Tue, 6 Sep 2022 03:22:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231398AbiIFHWN (ORCPT ); Tue, 6 Sep 2022 03:22:13 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1695F7393C; Tue, 6 Sep 2022 00:22:12 -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=EHkWMjiSw6sMSHyk1j8ZDqGlGyNnE9pNuM0MT92Hdqk=; b=sEDZ5UjlGn93jHjXSEkts3JDd6 FWZwllRmftVq6Bf3K9hrkiAayQf7kTE1lZmaT2SaA7oLv1PyExzyofzMNCgBS1C2Z6rsSugqADthJ 7VpRieGXMNQBFDYEnXqb/VWQL8U1iFVztWKLDvSycJb+MN3aGWOLjHyONWzFsW2SIoopERqYNVAUX lbagcl6lzY277wvyHs4mJwfxbv8/uEpjjD66JSj5xWw4zoBWDRleTqK2DHTB+/wJ0mbEDX/vP87mF DyzJnia5+03A6jPHKeKFvBiC10WJBwHgsJmzrg2wwv4DfNCJPQ1iDBZ7izyurOhu0WggtuqNHjI5o cfTLMbDA==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1oVSuG-00Akwx-OK; Tue, 06 Sep 2022 07:22:00 +0000 Date: Tue, 6 Sep 2022 00:22:00 -0700 From: Christoph Hellwig To: John Hubbard Cc: Christoph Hellwig , Andrew Morton , Jens Axboe , Alexander Viro , Miklos Szeredi , "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 0/7] convert most filesystems to pin_user_pages_fast() Message-ID: References: <20220831041843.973026-1-jhubbard@nvidia.com> <50d1d649-cb41-3031-c459-bbd38295c619@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <50d1d649-cb41-3031-c459-bbd38295c619@nvidia.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=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE 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-nfs@vger.kernel.org On Tue, Sep 06, 2022 at 12:10:54AM -0700, John Hubbard wrote: > I would be delighted if that were somehow possible. Every time I think > it's possible, it has fallen apart. The fact that bio_release_pages() > will need to switch over from put_page() to unpin_user_page(), combined > with the fact that there are a lot of callers that submit bios, has > led me to the current approach. We can (temporarily) pass the gup flag to bio_release_pages or even better add a new bio_unpin_pages helper that undoes the pin side. That is: don't try to reuse the old APIs, but ad new ones, just like we do on the lower layers.