From: David Ahern <dsahern@gmail.com>
To: Xuan Zhuo <xuanzhuo@linux.alibaba.com>, netdev@vger.kernel.org
Cc: Jakub Kicinski <kuba@kernel.org>,
virtualization@lists.linux-foundation.org,
"David S. Miller" <davem@davemloft.net>,
"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [PATCH net-next v3] virtio-net: page_to_skb() use build_skb when there's sufficient tailroom
Date: Mon, 19 Apr 2021 09:48:16 -0700 [thread overview]
Message-ID: <ebaeb57a-924a-43e4-bd5f-e41ecce9ffe6@gmail.com> (raw)
In-Reply-To: <20210416091615.25198-1-xuanzhuo@linux.alibaba.com>
On 4/16/21 2:16 AM, Xuan Zhuo wrote:
> In page_to_skb(), if we have enough tailroom to save skb_shared_info, we
> can use build_skb to create skb directly. No need to alloc for
> additional space. And it can save a 'frags slot', which is very friendly
> to GRO.
>
> Here, if the payload of the received package is too small (less than
> GOOD_COPY_LEN), we still choose to copy it directly to the space got by
> napi_alloc_skb. So we can reuse these pages.
>
> Testing Machine:
> The four queues of the network card are bound to the cpu1.
>
> Test command:
> for ((i=0;i<5;++i)); do sockperf tp --ip 192.168.122.64 -m 1000 -t 150& done
>
> The size of the udp package is 1000, so in the case of this patch, there
> will always be enough tailroom to use build_skb. The sent udp packet
> will be discarded because there is no port to receive it. The irqsoftd
> of the machine is 100%, we observe the received quantity displayed by
> sar -n DEV 1:
>
> no build_skb: 956864.00 rxpck/s
> build_skb: 1158465.00 rxpck/s
>
virtio_net is using napi_consume_skb, so napi_build_skb should show a
small increase from build_skb.
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
WARNING: multiple messages have this Message-ID (diff)
From: David Ahern <dsahern@gmail.com>
To: Xuan Zhuo <xuanzhuo@linux.alibaba.com>, netdev@vger.kernel.org
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
Jason Wang <jasowang@redhat.com>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
virtualization@lists.linux-foundation.org
Subject: Re: [PATCH net-next v3] virtio-net: page_to_skb() use build_skb when there's sufficient tailroom
Date: Mon, 19 Apr 2021 09:48:16 -0700 [thread overview]
Message-ID: <ebaeb57a-924a-43e4-bd5f-e41ecce9ffe6@gmail.com> (raw)
In-Reply-To: <20210416091615.25198-1-xuanzhuo@linux.alibaba.com>
On 4/16/21 2:16 AM, Xuan Zhuo wrote:
> In page_to_skb(), if we have enough tailroom to save skb_shared_info, we
> can use build_skb to create skb directly. No need to alloc for
> additional space. And it can save a 'frags slot', which is very friendly
> to GRO.
>
> Here, if the payload of the received package is too small (less than
> GOOD_COPY_LEN), we still choose to copy it directly to the space got by
> napi_alloc_skb. So we can reuse these pages.
>
> Testing Machine:
> The four queues of the network card are bound to the cpu1.
>
> Test command:
> for ((i=0;i<5;++i)); do sockperf tp --ip 192.168.122.64 -m 1000 -t 150& done
>
> The size of the udp package is 1000, so in the case of this patch, there
> will always be enough tailroom to use build_skb. The sent udp packet
> will be discarded because there is no port to receive it. The irqsoftd
> of the machine is 100%, we observe the received quantity displayed by
> sar -n DEV 1:
>
> no build_skb: 956864.00 rxpck/s
> build_skb: 1158465.00 rxpck/s
>
virtio_net is using napi_consume_skb, so napi_build_skb should show a
small increase from build_skb.
next prev parent reply other threads:[~2021-04-19 16:48 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-16 9:16 [PATCH net-next v3] virtio-net: page_to_skb() use build_skb when there's sufficient tailroom Xuan Zhuo
2021-04-19 3:10 ` Jason Wang
2021-04-19 3:10 ` Jason Wang
2021-04-19 16:48 ` David Ahern [this message]
2021-04-19 16:48 ` David Ahern
2021-04-20 2:49 ` Jason Wang
2021-04-20 2:49 ` Jason Wang
2021-04-19 23:29 ` Mat Martineau
2021-04-20 2:38 ` Jason Wang
2021-04-20 2:38 ` Jason Wang
2021-04-20 2:41 ` Jason Wang
2021-04-20 2:41 ` Jason Wang
2021-04-20 9:28 ` Eric Dumazet
2021-04-20 9:28 ` Eric Dumazet
2021-04-22 11:13 ` Ido Schimmel
2021-04-22 11:13 ` Ido Schimmel
[not found] ` <1619093551.9680612-1-xuanzhuo@linux.alibaba.com>
2021-04-22 12:55 ` Ido Schimmel
2021-04-22 12:55 ` Ido Schimmel
[not found] <1618922142.0493622-1-xuanzhuo@linux.alibaba.com>
2021-04-21 3:26 ` Jason Wang
2021-04-21 3:26 ` Jason Wang
[not found] <1619491565.7682261-1-xuanzhuo@linux.alibaba.com>
2021-04-28 1:21 ` Jason Wang
2021-04-28 1:21 ` Jason Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ebaeb57a-924a-43e4-bd5f-e41ecce9ffe6@gmail.com \
--to=dsahern@gmail.com \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=virtualization@lists.linux-foundation.org \
--cc=xuanzhuo@linux.alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.