Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp4302174iog; Tue, 28 Jun 2022 13:17:19 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tzTcNvXhSxx53MYiRtmHsA7Jjy4JShyCNX7GIDNeDimSoP0QoAytLu92aYMfqDU1Vk1SIU X-Received: by 2002:a17:90a:4f0a:b0:1ec:89bd:725c with SMTP id p10-20020a17090a4f0a00b001ec89bd725cmr1502068pjh.172.1656447438858; Tue, 28 Jun 2022 13:17:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656447438; cv=none; d=google.com; s=arc-20160816; b=LH0FJUBMyB3dFVYIv/sa+Kub8WCKMTfFCxDrsyRvez1+VkvLNQB0UpUwlLvWxnluZn RaQPlIf2GAj6a3vDgoY+/EP07n4Bpqw+RtDp9C1pCQNVxinHq9gUhZQiR0jx5iP6C1zK PJpl9OtGfR9lFeWjI/YZTwhje62yVUXM6WJOaABSFy2ygXkWaPLeXY9ArrxaoOaxGACy suLqDbacbG2cexuoQvOfSdBxx27rmpyrSKtDwOEGHD7QwCjQ4pErgRZJt/UDPgghq6fB K2sghMSP8pu46fI2CTW50SXbTVh7i0qKa23TPSgM7ft5X27pxu2HqRGcHVgA41J/i8YB UsNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=rYwxNegCMlm2Id7OalQvY0kkmq2kUGQgEhzGLW81nyA=; b=QL8g7aOz05UVIVEAr+LF0bUVnvJ9Y061XfhEtJfVFAlIJDPiaHtWMvcwvC18rQWdmE p3pQdeMvaADNUjnIdwa/o1QYrjwg7TqYNrjjVQPBI+Of92Iq9Uq+KE+HJ0v/NfZw5p0x r0MWWMPo4UYNpSn3b3lUBFKD1oiTQ7azSiXBkfw3x6Xvb4x2At8AyoO2ZkpRIFZtceW8 WnloVbdQtdkAk6fBFkKhSVUUg9L+/udRszu4fcA67CRIMQb0SKmDt0dnQ5ccl60fiS62 6yVLhJaaGBOchAGKNxvZcmvwcayY8PuTZcaSgXgLuG8DfeWlZ0MTv3rdB4Has3MeC3+D syPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b="Rd/meJi9"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zeniv.linux.org.uk Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l7-20020a17090a850700b001e2d210b8ecsi603836pjn.188.2022.06.28.13.17.06; Tue, 28 Jun 2022 13:17:18 -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=@linux.org.uk header.s=zeniv-20220401 header.b="Rd/meJi9"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zeniv.linux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231955AbiF1UOA (ORCPT + 99 others); Tue, 28 Jun 2022 16:14:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230170AbiF1UNn (ORCPT ); Tue, 28 Jun 2022 16:13:43 -0400 Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [IPv6:2a03:a000:7:0:5054:ff:fe1c:15ff]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D878E3CFF7; Tue, 28 Jun 2022 13:06:16 -0700 (PDT) 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=rYwxNegCMlm2Id7OalQvY0kkmq2kUGQgEhzGLW81nyA=; b=Rd/meJi9pyM33xqBvPb52ogYx5 +QEXnHqLcKyDM5oz/wgW4Hw6mogY2/IsBSVZtluBYRmRBpAJ8fvEkmF2MXEpbOMoUZKx/FX8V+nfP fryxy98+UAYkhPF4HRcdFm1Ufkgl73Ve9rbWUZuQNOPspQBTxvkjE3rhCYbOTrIv24OAWcQp+y/DZ /A+c5NBwpzGy2uumpa79qRdosUqohYVQWbsS5j5Lx8n+9Nd1rb+djSciXOQoEy1F6zGcHsVw/r06/ LoLeWUF7W54o20f3W8iM0Zbh6TNm2P/HetjvvDRVws6O8yuBFl8IbL0jXxxYdh6MHvtOfMjAuVGPC Qkbrb7jQ==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.95 #2 (Red Hat Linux)) id 1o6HTO-005jkE-Th; Tue, 28 Jun 2022 20:06:10 +0000 Date: Tue, 28 Jun 2022 21:06:10 +0100 From: Al Viro To: Pavel Begunkov Cc: io-uring@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, "David S . Miller" , Jakub Kicinski , Jonathan Lemon , Willem de Bruijn , Jens Axboe , kernel-team@fb.com Subject: Re: [RFC net-next v3 05/29] net: bvec specific path in zerocopy_sg_from_iter Message-ID: References: <5143111391e771dc97237e2a5e6a74223ef8f15f.1653992701.git.asml.silence@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5143111391e771dc97237e2a5e6a74223ef8f15f.1653992701.git.asml.silence@gmail.com> Sender: Al Viro X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,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-kernel@vger.kernel.org On Tue, Jun 28, 2022 at 07:56:27PM +0100, Pavel Begunkov wrote: > Add an bvec specialised and optimised path in zerocopy_sg_from_iter. > It'll be used later for {get,put}_page() optimisations. If you need a variant that would not grab page references for ITER_BVEC (and presumably other non-userland ones), the natural thing to do would be to provide just such a primitive, wouldn't it? The fun question here is by which paths ITER_BVEC can be passed to that function and which all of them are currently guaranteed to hold the underlying pages pinned... And AFAICS you quietly assume that only ITER_BVEC ones will ever have that "managed" flag of your set. Or am I misreading the next patch in the series?