Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1045800rwd; Wed, 7 Jun 2023 10:10:50 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5EC8Zi9gljruRJ/HH2PylAeld2SiO2l4dlAA0ahiZYFKlWNaDmfXdW3dLkfQrHCLCW9loK X-Received: by 2002:a05:6a20:3d1f:b0:114:c11c:7ad5 with SMTP id y31-20020a056a203d1f00b00114c11c7ad5mr1650315pzi.52.1686157849962; Wed, 07 Jun 2023 10:10:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686157849; cv=none; d=google.com; s=arc-20160816; b=GsXkUeMeCO04pmgIHYY8WoptYjf4eTM8/CXkuEwilVGdni0Sxvt/U6rqmLwKCNILhX 5q45w80vckhQxsQqNNR/I9Y4BPGAauBMJklNncY++3FfoXLJhPxeddQEhoTgUpApeM6V LbJrIULls2WycqF4ohJ0kT/NtBYi4cmGjnsA4QDME9IZUdhWxzg9oUJmmfBYmmpWS1GZ GJCBfHO9/2xWETyVQOok0IAeqzUC9wv1oJicRn0whhaWKnU1Y5DUElxPLUR8nJMuZrJH AK5TX2lK57WjroB/QUyZwrXTPkl13gP5WyJV28Fr+utYfDzZoHxrawtDeKx5TY2DGcGP PIkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=J+H3g9SqbnEYV3HrcjOe0tDfDT4LBisfxC/tzx3PMkY=; b=PG9oxlWX+Yfdkeb4pkI1Ae3JghPQJBwfGZHpSvdHGlXjHXPRvkXNzTsKijGbI36JiI zcPteof9DHbXzAp7UtHF+XK97NGuZSOoRy5n/pkCdSveecSJa35oct4gNbCjwENe/BDV s3mws9g/4FL4HXux//pfYJB3R1D9xlC32almCuaJXPUl7ENOIppUwSJrD5dwHi8UNM4E HffgepJJ3c8pvL6xv6C8GjmIj97nGznYL8CX0QRuT0CeDtjZKDbD0nDgjFTActmaPJP/ rDw1Gd/fV4EhppMeSG9ulTiiC4qawwthBc+tz/SFm3IuN20HA9v0jp2E9mi2UL1HoCOR zpKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BIGFLMdM; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s13-20020a63924d000000b005440dd28367si1582426pgn.407.2023.06.07.10.10.35; Wed, 07 Jun 2023 10:10:49 -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=@kernel.org header.s=k20201202 header.b=BIGFLMdM; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230496AbjFGQzt (ORCPT + 99 others); Wed, 7 Jun 2023 12:55:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230179AbjFGQzr (ORCPT ); Wed, 7 Jun 2023 12:55:47 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2267E13D for ; Wed, 7 Jun 2023 09:55:44 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 97ADD641AC for ; Wed, 7 Jun 2023 16:55:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5B56FC433D2; Wed, 7 Jun 2023 16:55:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686156943; bh=lHpEd50gTEijmEkCWFoSmf/58Vv4Gh9yH0NWwWRI72s=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=BIGFLMdMuRmdqyJ2qczERmqoGOrsBTFZf0BiKTQ6pXacpR/QWGXGR8/+TfyXRKinm /750GR+7G0ymWTqZOOJjd5COL8MhF7UOqQP3xcSmq3v6828yxllyjaNR8fOzlF+zS2 PtrxBwx7qOZwG4YFRf4WW8SiLBC72+05royNh0kS33pNY+ekXbfapAzMl1xU0zyu+n F4UurRtC/XLSBkKAtH05rW5vMvfg+9qckLbJXwYSw1qgDoJsnWgaFAMHi3UixJYeDc kSBwE6Ph2mNlIXIuQIaM8dg0qpi1Zus2is2ZZZd6tHhQJJjmsMEyMNECtM8Sunwyzl y4xlZhQ6tnNMg== Date: Wed, 7 Jun 2023 09:55:41 -0700 From: Jakub Kicinski To: David Howells Cc: netdev@vger.kernel.org, Linus Torvalds , Chuck Lever , Boris Pismenny , John Fastabend , "David S. Miller" , Eric Dumazet , Paolo Abeni , Willem de Bruijn , David Ahern , Matthew Wilcox , Jens Axboe , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next v5 03/14] splice, net: Use sendmsg(MSG_SPLICE_PAGES) rather than ->sendpage() Message-ID: <20230607095541.586a3300@kernel.org> In-Reply-To: <20230607140559.2263470-4-dhowells@redhat.com> References: <20230607140559.2263470-1-dhowells@redhat.com> <20230607140559.2263470-4-dhowells@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,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 Wed, 7 Jun 2023 15:05:48 +0100 David Howells wrote: > Replace generic_splice_sendpage() + splice_from_pipe + pipe_to_sendpage() > with a net-specific handler, splice_to_socket(), that calls sendmsg() with > MSG_SPLICE_PAGES set instead of calling ->sendpage(). > > MSG_MORE is used to indicate if the sendmsg() is expected to be followed > with more data. > > This allows multiple pipe-buffer pages to be passed in a single call in a > BVEC iterator, allowing the processing to be pushed down to a loop in the > protocol driver. This helps pave the way for passing multipage folios down > too. > > Protocols that haven't been converted to handle MSG_SPLICE_PAGES yet should > just ignore it and do a normal sendmsg() for now - although that may be a > bit slower as it may copy everything. Reviewed-by: Jakub Kicinski