Message ID | 20230727222627.1895355-1-AVKrasnov@sberdevices.ru |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:918b:0:b0:3e4:2afc:c1 with SMTP id s11csp57524vqg; Thu, 27 Jul 2023 15:59:10 -0700 (PDT) X-Google-Smtp-Source: APBJJlEB2Wt4JLslShw92Cxhku0jPSzE39ge8pL2ruzN9NiD0BTSX14FwLkoaPkz5Rs1oP/6DVu0 X-Received: by 2002:a17:903:258c:b0:1bb:35b6:4490 with SMTP id jb12-20020a170903258c00b001bb35b64490mr597628plb.22.1690498749949; Thu, 27 Jul 2023 15:59:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690498749; cv=none; d=google.com; s=arc-20160816; b=nXJDgW2AbSX/70BBgWO1hyJVB5TI15U9r5o34L16ZfUrP/DB2wcPlhC4Sp/1ITJfYW FtLfMgt7eY1ToD1N1PPvm9mfA6HdEPJLIiNV3xMXf1YUIIkMO5rXaKxBh7YSWo+8sV4x q8FBU8FzFuR8X8iXW6X7dSeMcvaC+fzw5rL0WpfEJGFluSJ9DnEI+PdmvU33S7FVYQxa 9pvoQKel3P+9tP7Po9xp/uk6Xd9U+R4NIb8Z7VROuO0wye3iPBcZGmrFRwe8NjJpe7vZ lSVcDtg+TRtziXfXEC9lYQFzQsvJb1ChW8+SMnX6IXgIujI/q8t6fUSqZ7JT3EbrHUT2 5Y6w== 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 :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=IsmKJ/jqcuZa5LQ1yHb+N0LqenyHgFebC0piM5XZJFg=; fh=IiLlUAYZQ4hWuQbi3V9KE00VdjFsw4tg4Y6JCUFRLn0=; b=CO+0A5WIR6TIzRwyMvxpzv48jJ2xFg2vcp647CF75Y+DLBlKvpRcjSR4jCFB+0eOii nk3lfwnYbdmcLoyWjUB+tWC9rKIFpoE12MkeArGjKdZCKZOxbTmK7ew0pP47R5QE0Lqu cp+pwArQDK/HGRap0FJfbBH5IwLUOFVL9Mxl0y2V+TFc1snnRs7ynMb8KvS4PAQ9zQla fmS3MGHjwY2SeULc6AcLXHtv+iQri0PVkzdNhVQoinZiIGpz9RzWTRsslEn96hGb5S6U ZIE94Nm7rH6oRfHtgrTNFPKdQOD990k41qtJFACN8T1JRiqoHrN8wnBsM6yarMo49lsT sDMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=Uvh2Ljr2; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x17-20020a1709027c1100b001b3e073e157si1850362pll.125.2023.07.27.15.58.56; Thu, 27 Jul 2023 15:59:09 -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=@sberdevices.ru header.s=mail header.b=Uvh2Ljr2; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232944AbjG0WcX (ORCPT <rfc822;kloczko.tomasz@gmail.com> + 99 others); Thu, 27 Jul 2023 18:32:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46650 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232832AbjG0WcR (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 27 Jul 2023 18:32:17 -0400 Received: from mx1.sberdevices.ru (mx2.sberdevices.ru [45.89.224.132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C6EA42D63; Thu, 27 Jul 2023 15:32:13 -0700 (PDT) Received: from p-infra-ksmg-sc-msk02 (localhost [127.0.0.1]) by mx1.sberdevices.ru (Postfix) with ESMTP id 14B04120004; Fri, 28 Jul 2023 01:32:11 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.sberdevices.ru 14B04120004 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1690497131; bh=IsmKJ/jqcuZa5LQ1yHb+N0LqenyHgFebC0piM5XZJFg=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:From; b=Uvh2Ljr2mHc0NV3egjwZbzYEfZAg7+leKTU2cwdMmxgr62H6hbjyX6xGK1LCgxdLl C9QFR/DIgm+UQpJrcVavbtawsIEbFL7Ax2rBZSk9YhfxFJbxxVxWYBt8lHpANyH1yy 408JPrrBXhAZ+LLIxQwL8uPgxMqPKAXqpDz+QRtcslJ08TYMMtOIxsZyFyKNgwbNOk 2t5RNDFIWXFujqw5CAHxpZ8Mw4cOcy7QCOhBWS142ajlOPNFGYvikDADZD/b4nMn4l YSINVJ5lKMNYAsUbCQaLmWBsTHoMOpQna2Pg7UzWscQW22Aw+ij8cR9T3c06WbJUob xXuSLYjO/uBJw== Received: from p-i-exch-sc-m01.sberdevices.ru (p-i-exch-sc-m01.sberdevices.ru [172.16.192.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.sberdevices.ru (Postfix) with ESMTPS; Fri, 28 Jul 2023 01:32:10 +0300 (MSK) Received: from localhost.localdomain (100.64.160.123) by p-i-exch-sc-m01.sberdevices.ru (172.16.192.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.30; Fri, 28 Jul 2023 01:31:50 +0300 From: Arseniy Krasnov <AVKrasnov@sberdevices.ru> To: Stefan Hajnoczi <stefanha@redhat.com>, Stefano Garzarella <sgarzare@redhat.com>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>, Jason Wang <jasowang@redhat.com>, Bobby Eshleman <bobby.eshleman@bytedance.com> CC: <kvm@vger.kernel.org>, <virtualization@lists.linux-foundation.org>, <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <kernel@sberdevices.ru>, <oxffffaa@gmail.com>, <avkrasnov@sberdevices.ru>, Arseniy Krasnov <AVKrasnov@sberdevices.ru> Subject: [PATCH net-next v4 0/4] vsock/virtio/vhost: MSG_ZEROCOPY preparations Date: Fri, 28 Jul 2023 01:26:23 +0300 Message-ID: <20230727222627.1895355-1-AVKrasnov@sberdevices.ru> X-Mailer: git-send-email 2.35.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [100.64.160.123] X-ClientProxiedBy: p-i-exch-sc-m02.sberdevices.ru (172.16.192.103) To p-i-exch-sc-m01.sberdevices.ru (172.16.192.107) X-KSMG-Rule-ID: 10 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Lua-Profiles: 178796 [Jul 22 2023] X-KSMG-AntiSpam-Version: 5.9.59.0 X-KSMG-AntiSpam-Envelope-From: AVKrasnov@sberdevices.ru X-KSMG-AntiSpam-Rate: 0 X-KSMG-AntiSpam-Status: not_detected X-KSMG-AntiSpam-Method: none X-KSMG-AntiSpam-Auth: dkim=none X-KSMG-AntiSpam-Info: LuaCore: 525 525 723604743bfbdb7e16728748c3fa45e9eba05f7d, {Tracking_uf_ne_domains}, {Tracking_from_domain_doesnt_match_to}, FromAlignment: s, ApMailHostAddress: 100.64.160.123 X-MS-Exchange-Organization-SCL: -1 X-KSMG-AntiSpam-Interceptor-Info: scan successful X-KSMG-AntiPhishing: Clean, bases: 2023/07/23 10:45:00 X-KSMG-LinksScanning: Clean, bases: 2023/07/23 10:46:00 X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 2.0.1.6960, bases: 2023/07/23 08:49:00 #21663637 X-KSMG-AntiVirus-Status: Clean, skipped X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772616417150498408 X-GMAIL-MSGID: 1772616417150498408 |
Series |
vsock/virtio/vhost: MSG_ZEROCOPY preparations
|
|
Message
Arseniy Krasnov
July 27, 2023, 10:26 p.m. UTC
Hello, this patchset is first of three parts of another big patchset for MSG_ZEROCOPY flag support: https://lore.kernel.org/netdev/20230701063947.3422088-1-AVKrasnov@sberdevices.ru/ During review of this series, Stefano Garzarella <sgarzare@redhat.com> suggested to split it for three parts to simplify review and merging: 1) virtio and vhost updates (for fragged skbs) <--- this patchset 2) AF_VSOCK updates (allows to enable MSG_ZEROCOPY mode and read tx completions) and update for Documentation/. 3) Updates for tests and utils. This series enables handling of fragged skbs in virtio and vhost parts. Newly logic won't be triggered, because SO_ZEROCOPY options is still impossible to enable at this moment (next bunch of patches from big set above will enable it). I've included changelog to some patches anyway, because there were some comments during review of last big patchset from the link above. Head for this patchset is 9d0cd5d25f7d45bce01bbb3193b54ac24b3a60f3 Link to v1: https://lore.kernel.org/netdev/20230717210051.856388-1-AVKrasnov@sberdevices.ru/ Link to v2: https://lore.kernel.org/netdev/20230718180237.3248179-1-AVKrasnov@sberdevices.ru/ Link to v3: https://lore.kernel.org/netdev/20230720214245.457298-1-AVKrasnov@sberdevices.ru/ Changelog: * Patchset rebased and tested on new HEAD of net-next (see hash above). * See per-patch changelog after ---. Arseniy Krasnov (4): vsock/virtio/vhost: read data from non-linear skb vsock/virtio: support to send non-linear skb vsock/virtio: non-linear skb handling for tap vsock/virtio: MSG_ZEROCOPY flag support drivers/vhost/vsock.c | 14 +- include/linux/virtio_vsock.h | 6 + net/vmw_vsock/virtio_transport.c | 79 +++++- net/vmw_vsock/virtio_transport_common.c | 312 ++++++++++++++++++------ 4 files changed, 330 insertions(+), 81 deletions(-)
Comments
On Fri, Jul 28, 2023 at 01:26:23AM +0300, Arseniy Krasnov wrote: > Hello, > > this patchset is first of three parts of another big patchset for > MSG_ZEROCOPY flag support: > https://lore.kernel.org/netdev/20230701063947.3422088-1-AVKrasnov@sberdevices.ru/ overall looks good. Two points I'd like to see addressed: - what's the performance with all these changes - still same? - most systems have a copybreak scheme where buffers smaller than a given size are copied directly. This will address regression you see with small buffers - but need to find that value. we know it's between 4k and 32k :) > During review of this series, Stefano Garzarella <sgarzare@redhat.com> > suggested to split it for three parts to simplify review and merging: > > 1) virtio and vhost updates (for fragged skbs) <--- this patchset > 2) AF_VSOCK updates (allows to enable MSG_ZEROCOPY mode and read > tx completions) and update for Documentation/. > 3) Updates for tests and utils. > > This series enables handling of fragged skbs in virtio and vhost parts. > Newly logic won't be triggered, because SO_ZEROCOPY options is still > impossible to enable at this moment (next bunch of patches from big > set above will enable it). > > I've included changelog to some patches anyway, because there were some > comments during review of last big patchset from the link above. > > Head for this patchset is 9d0cd5d25f7d45bce01bbb3193b54ac24b3a60f3 > > Link to v1: > https://lore.kernel.org/netdev/20230717210051.856388-1-AVKrasnov@sberdevices.ru/ > Link to v2: > https://lore.kernel.org/netdev/20230718180237.3248179-1-AVKrasnov@sberdevices.ru/ > Link to v3: > https://lore.kernel.org/netdev/20230720214245.457298-1-AVKrasnov@sberdevices.ru/ > > Changelog: > * Patchset rebased and tested on new HEAD of net-next (see hash above). > * See per-patch changelog after ---. > > Arseniy Krasnov (4): > vsock/virtio/vhost: read data from non-linear skb > vsock/virtio: support to send non-linear skb > vsock/virtio: non-linear skb handling for tap > vsock/virtio: MSG_ZEROCOPY flag support > > drivers/vhost/vsock.c | 14 +- > include/linux/virtio_vsock.h | 6 + > net/vmw_vsock/virtio_transport.c | 79 +++++- > net/vmw_vsock/virtio_transport_common.c | 312 ++++++++++++++++++------ > 4 files changed, 330 insertions(+), 81 deletions(-) > > -- > 2.25.1
On 28.07.2023 08:45, Michael S. Tsirkin wrote: > On Fri, Jul 28, 2023 at 01:26:23AM +0300, Arseniy Krasnov wrote: >> Hello, >> >> this patchset is first of three parts of another big patchset for >> MSG_ZEROCOPY flag support: >> https://lore.kernel.org/netdev/20230701063947.3422088-1-AVKrasnov@sberdevices.ru/ > > overall looks good. Two points I'd like to see addressed: Thanks! > - what's the performance with all these changes - still same? Yes, I perform quick tests and seems result are same. This is because last implemented logic when I compare size of payload against 'num_max' is for "emergency" case and not triggered in default environment. Anyway, I'll perform retest at least in nested guest case. > - most systems have a copybreak scheme where buffers > smaller than a given size are copied directly. > This will address regression you see with small buffers - > but need to find that value. we know it's between 4k and 32k :) I see, You suggest to find this value and add this check for decision to use zerocopy or copy ? Thanks, Arseniy > > >> During review of this series, Stefano Garzarella <sgarzare@redhat.com> >> suggested to split it for three parts to simplify review and merging: >> >> 1) virtio and vhost updates (for fragged skbs) <--- this patchset >> 2) AF_VSOCK updates (allows to enable MSG_ZEROCOPY mode and read >> tx completions) and update for Documentation/. >> 3) Updates for tests and utils. >> >> This series enables handling of fragged skbs in virtio and vhost parts. >> Newly logic won't be triggered, because SO_ZEROCOPY options is still >> impossible to enable at this moment (next bunch of patches from big >> set above will enable it). >> >> I've included changelog to some patches anyway, because there were some >> comments during review of last big patchset from the link above. >> >> Head for this patchset is 9d0cd5d25f7d45bce01bbb3193b54ac24b3a60f3 >> >> Link to v1: >> https://lore.kernel.org/netdev/20230717210051.856388-1-AVKrasnov@sberdevices.ru/ >> Link to v2: >> https://lore.kernel.org/netdev/20230718180237.3248179-1-AVKrasnov@sberdevices.ru/ >> Link to v3: >> https://lore.kernel.org/netdev/20230720214245.457298-1-AVKrasnov@sberdevices.ru/ >> >> Changelog: >> * Patchset rebased and tested on new HEAD of net-next (see hash above). >> * See per-patch changelog after ---. >> >> Arseniy Krasnov (4): >> vsock/virtio/vhost: read data from non-linear skb >> vsock/virtio: support to send non-linear skb >> vsock/virtio: non-linear skb handling for tap >> vsock/virtio: MSG_ZEROCOPY flag support >> >> drivers/vhost/vsock.c | 14 +- >> include/linux/virtio_vsock.h | 6 + >> net/vmw_vsock/virtio_transport.c | 79 +++++- >> net/vmw_vsock/virtio_transport_common.c | 312 ++++++++++++++++++------ >> 4 files changed, 330 insertions(+), 81 deletions(-) >> >> -- >> 2.25.1 >
On 28.07.2023 11:00, Arseniy Krasnov wrote: > > > On 28.07.2023 08:45, Michael S. Tsirkin wrote: >> On Fri, Jul 28, 2023 at 01:26:23AM +0300, Arseniy Krasnov wrote: >>> Hello, >>> >>> this patchset is first of three parts of another big patchset for >>> MSG_ZEROCOPY flag support: >>> https://lore.kernel.org/netdev/20230701063947.3422088-1-AVKrasnov@sberdevices.ru/ >> >> overall looks good. Two points I'd like to see addressed: > > Thanks! > >> - what's the performance with all these changes - still same? > > Yes, I perform quick tests and seems result are same. This is because last > implemented logic when I compare size of payload against 'num_max' is > for "emergency" case and not triggered in default environment. Anyway, I'll > perform retest at least in nested guest case. "default environment" is vanilla Qemu where queue size is 128 elements. To test this logic i rebuild Qemu with for example queue of 8 elements. Thanks, Arseniy > >> - most systems have a copybreak scheme where buffers >> smaller than a given size are copied directly. >> This will address regression you see with small buffers - >> but need to find that value. we know it's between 4k and 32k :) > > I see, You suggest to find this value and add this check for decision to > use zerocopy or copy ? > > Thanks, Arseniy > >> >> >>> During review of this series, Stefano Garzarella <sgarzare@redhat.com> >>> suggested to split it for three parts to simplify review and merging: >>> >>> 1) virtio and vhost updates (for fragged skbs) <--- this patchset >>> 2) AF_VSOCK updates (allows to enable MSG_ZEROCOPY mode and read >>> tx completions) and update for Documentation/. >>> 3) Updates for tests and utils. >>> >>> This series enables handling of fragged skbs in virtio and vhost parts. >>> Newly logic won't be triggered, because SO_ZEROCOPY options is still >>> impossible to enable at this moment (next bunch of patches from big >>> set above will enable it). >>> >>> I've included changelog to some patches anyway, because there were some >>> comments during review of last big patchset from the link above. >>> >>> Head for this patchset is 9d0cd5d25f7d45bce01bbb3193b54ac24b3a60f3 >>> >>> Link to v1: >>> https://lore.kernel.org/netdev/20230717210051.856388-1-AVKrasnov@sberdevices.ru/ >>> Link to v2: >>> https://lore.kernel.org/netdev/20230718180237.3248179-1-AVKrasnov@sberdevices.ru/ >>> Link to v3: >>> https://lore.kernel.org/netdev/20230720214245.457298-1-AVKrasnov@sberdevices.ru/ >>> >>> Changelog: >>> * Patchset rebased and tested on new HEAD of net-next (see hash above). >>> * See per-patch changelog after ---. >>> >>> Arseniy Krasnov (4): >>> vsock/virtio/vhost: read data from non-linear skb >>> vsock/virtio: support to send non-linear skb >>> vsock/virtio: non-linear skb handling for tap >>> vsock/virtio: MSG_ZEROCOPY flag support >>> >>> drivers/vhost/vsock.c | 14 +- >>> include/linux/virtio_vsock.h | 6 + >>> net/vmw_vsock/virtio_transport.c | 79 +++++- >>> net/vmw_vsock/virtio_transport_common.c | 312 ++++++++++++++++++------ >>> 4 files changed, 330 insertions(+), 81 deletions(-) >>> >>> -- >>> 2.25.1 >>
On 28.07.2023 08:45, Michael S. Tsirkin wrote: > On Fri, Jul 28, 2023 at 01:26:23AM +0300, Arseniy Krasnov wrote: >> Hello, >> >> this patchset is first of three parts of another big patchset for >> MSG_ZEROCOPY flag support: >> https://lore.kernel.org/netdev/20230701063947.3422088-1-AVKrasnov@sberdevices.ru/ > > overall looks good. Two points I'd like to see addressed: > - what's the performance with all these changes - still same? Hello Michael, here are results on the last version: There is some difference between these numbers and numbers from link (it was v3). Looks like new version of zerocopy become slower on big buffers. But anyway it is faster than copy mode in all cases (except <<<<<< marked line below, but I had same result for this testcase in v3 before). I tried to find reason of this difference by switching to v3 version, but seems it is no easy - I get current results again. I guess reason maybe: 1) My environment change - I perform this test in nested virtualization mode, so host OS may also affect performance. 2) My mistake in v3 :( Anyway: 1) MSG_ZEROCOPY is still faster than copy as expected. 2) I'v added column with benchmark on 'net-next' without MSG_ZEROCOPY patchset. Seems it doesn't affect copy performance. Cases where we have difference like 26 against 29 is not a big deal - final result is unstable with some error, e.g. if you run again same test, you can get opposite result like 29 against 26. 2) Numbers below could be considered valid. This is newest measurement. G2H transmission (values are Gbit/s): Core i7 with nested guest. *-------------------------------*-----------------------* | | | | | | buf size | copy | zerocopy | copy w/o MSG_ZEROCOPY | | | | | patchset | | | | | | *-------------------------------*-----------------------* | 4KB | 3 | 11 | 3 | *-------------------------------*-----------------------* | 32KB | 9 | 70 | 10 | *-------------------------------*-----------------------* | 256KB | 30 | 224 | 29 | *-------------------------------*-----------------------* | 1M | 27 | 285 | 30 | *-------------------------------*-----------------------* | 8M | 26 | 365 | 29 | *-------------------------------*-----------------------* H2G: Core i7 with nested guest. *-------------------------------*-----------------------* | | | | | | buf size | copy | zerocopy | copy w/o MSG_ZEROCOPY | | | | | patchset | | | | | | *-------------------------------*-----------------------* | 4KB | 17 | 10 | 17 | <<<<<< *-------------------------------*-----------------------* | 32KB | 30 | 61 | 31 | *-------------------------------*-----------------------* | 256KB | 35 | 214 | 30 | *-------------------------------*-----------------------* | 1M | 29 | 292 | 28 | *-------------------------------*-----------------------* | 8M | 28 | 341 | 28 | *-------------------------------*-----------------------* Loopback: Core i7 with nested guest. *-------------------------------*-----------------------* | | | | | | buf size | copy | zerocopy | copy w/o MSG_ZEROCOPY | | | | | patchset | | | | | | *-------------------------------*-----------------------* | 4KB | 8 | 7 | 8 | *-------------------------------*-----------------------* | 32KB | 27 | 43 | 30 | *-------------------------------*-----------------------* | 256KB | 38 | 100 | 39 | *-------------------------------*-----------------------* | 1M | 37 | 141 | 39 | *-------------------------------*-----------------------* | 8M | 40 | 201 | 36 | *-------------------------------*-----------------------* Thanks, Arseniy > - most systems have a copybreak scheme where buffers > smaller than a given size are copied directly. > This will address regression you see with small buffers - > but need to find that value. we know it's between 4k and 32k :) > > >> During review of this series, Stefano Garzarella <sgarzare@redhat.com> >> suggested to split it for three parts to simplify review and merging: >> >> 1) virtio and vhost updates (for fragged skbs) <--- this patchset >> 2) AF_VSOCK updates (allows to enable MSG_ZEROCOPY mode and read >> tx completions) and update for Documentation/. >> 3) Updates for tests and utils. >> >> This series enables handling of fragged skbs in virtio and vhost parts. >> Newly logic won't be triggered, because SO_ZEROCOPY options is still >> impossible to enable at this moment (next bunch of patches from big >> set above will enable it). >> >> I've included changelog to some patches anyway, because there were some >> comments during review of last big patchset from the link above. >> >> Head for this patchset is 9d0cd5d25f7d45bce01bbb3193b54ac24b3a60f3 >> >> Link to v1: >> https://lore.kernel.org/netdev/20230717210051.856388-1-AVKrasnov@sberdevices.ru/ >> Link to v2: >> https://lore.kernel.org/netdev/20230718180237.3248179-1-AVKrasnov@sberdevices.ru/ >> Link to v3: >> https://lore.kernel.org/netdev/20230720214245.457298-1-AVKrasnov@sberdevices.ru/ >> >> Changelog: >> * Patchset rebased and tested on new HEAD of net-next (see hash above). >> * See per-patch changelog after ---. >> >> Arseniy Krasnov (4): >> vsock/virtio/vhost: read data from non-linear skb >> vsock/virtio: support to send non-linear skb >> vsock/virtio: non-linear skb handling for tap >> vsock/virtio: MSG_ZEROCOPY flag support >> >> drivers/vhost/vsock.c | 14 +- >> include/linux/virtio_vsock.h | 6 + >> net/vmw_vsock/virtio_transport.c | 79 +++++- >> net/vmw_vsock/virtio_transport_common.c | 312 ++++++++++++++++++------ >> 4 files changed, 330 insertions(+), 81 deletions(-) >> >> -- >> 2.25.1 >