From: Jason Wang <jasowang@redhat.com>
To: David Ahern <dsahern@gmail.com>,
Xuan Zhuo <xuanzhuo@linux.alibaba.com>,
netdev@vger.kernel.org
Cc: "Michael S. Tsirkin" <mst@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: Tue, 20 Apr 2021 10:49:18 +0800 [thread overview]
Message-ID: <fadc2cdb-f6bd-394a-3bcd-9f0eaebddf26@redhat.com> (raw)
In-Reply-To: <ebaeb57a-924a-43e4-bd5f-e41ecce9ffe6@gmail.com>
在 2021/4/20 上午12:48, David Ahern 写道:
> 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.
>
Yes and we probably need to do this in receive_small().
Thanks
next prev parent reply other threads:[~2021-04-20 2:49 UTC|newest]
Thread overview: 12+ 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 16:48 ` David Ahern
2021-04-20 2:49 ` Jason Wang [this message]
2021-04-19 23:29 ` Mat Martineau
2021-04-20 2:38 ` Jason Wang
2021-04-20 2:41 ` Jason Wang
2021-04-20 9:28 ` Eric Dumazet
2021-04-22 11:13 ` Ido Schimmel
[not found] ` <1619093551.9680612-1-xuanzhuo@linux.alibaba.com>
2021-04-22 12:55 ` Ido Schimmel
[not found] <1618922142.0493622-1-xuanzhuo@linux.alibaba.com>
2021-04-21 3:26 ` Jason Wang
[not found] <1619491565.7682261-1-xuanzhuo@linux.alibaba.com>
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=fadc2cdb-f6bd-394a-3bcd-9f0eaebddf26@redhat.com \
--to=jasowang@redhat.com \
--cc=davem@davemloft.net \
--cc=dsahern@gmail.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).