* [PATCH net-next] virtio_net: replace netdev_alloc_skb_ip_align() with napi_alloc_skb()
@ 2016-03-17 14:44 Paolo Abeni
2016-03-18 1:00 ` Venkatesh Srinivas via Virtualization
2016-03-18 1:01 ` Venkatesh Srinivas via Virtualization
0 siblings, 2 replies; 4+ messages in thread
From: Paolo Abeni @ 2016-03-17 14:44 UTC (permalink / raw)
To: netdev; +Cc: virtualization, Hannes Frederic Sowa, Michael S. Tsirkin
This gives small but noticeable rx performance improvement (2-3%)
and will allow exploiting future napi improvement.
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
---
drivers/net/virtio_net.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index fb0eae4..49d84e5 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -260,7 +260,7 @@ static struct sk_buff *page_to_skb(struct virtnet_info *vi,
p = page_address(page) + offset;
/* copy small packet so we can reuse these pages for small data */
- skb = netdev_alloc_skb_ip_align(vi->dev, GOOD_COPY_LEN);
+ skb = napi_alloc_skb(&rq->napi, GOOD_COPY_LEN);
if (unlikely(!skb))
return NULL;
--
1.8.3.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] virtio_net: replace netdev_alloc_skb_ip_align() with napi_alloc_skb()
2016-03-17 14:44 [PATCH net-next] virtio_net: replace netdev_alloc_skb_ip_align() with napi_alloc_skb() Paolo Abeni
@ 2016-03-18 1:00 ` Venkatesh Srinivas via Virtualization
2016-03-18 1:01 ` Venkatesh Srinivas via Virtualization
1 sibling, 0 replies; 4+ messages in thread
From: Venkatesh Srinivas via Virtualization @ 2016-03-18 1:00 UTC (permalink / raw)
To: Paolo Abeni
Cc: netdev, Michael S. Tsirkin, Hannes Frederic Sowa, virtualization
[-- Attachment #1.1: Type: text/plain, Size: 568 bytes --]
On Thu, Mar 17, 2016 at 7:44 AM, Paolo Abeni <pabeni@redhat.com> wrote:
> This gives small but noticeable rx performance improvement (2-3%)
> and will allow exploiting future napi improvement.
>
> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
>
Worked in my tests, though the performance win was in the noise (+0.6% -
+1% bandwidth).
What tests did you see a 2-3% win on?
Do you think its worth modifying add_recvbuf_small() to use
napi_alloc_skb() when called from
Rx NAPI (virtnet_receive)?
Tested-by: Venkatesh Srinivas <venkateshs@google.com>
Thanks,
-- vs;
[-- Attachment #1.2: Type: text/html, Size: 1083 bytes --]
[-- Attachment #2: Type: text/plain, Size: 183 bytes --]
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] virtio_net: replace netdev_alloc_skb_ip_align() with napi_alloc_skb()
2016-03-17 14:44 [PATCH net-next] virtio_net: replace netdev_alloc_skb_ip_align() with napi_alloc_skb() Paolo Abeni
2016-03-18 1:00 ` Venkatesh Srinivas via Virtualization
@ 2016-03-18 1:01 ` Venkatesh Srinivas via Virtualization
2016-03-18 8:21 ` Paolo Abeni
1 sibling, 1 reply; 4+ messages in thread
From: Venkatesh Srinivas via Virtualization @ 2016-03-18 1:01 UTC (permalink / raw)
To: Paolo Abeni
Cc: netdev, Michael S. Tsirkin, Hannes Frederic Sowa, virtualization
On Thu, Mar 17, 2016 at 7:44 AM, Paolo Abeni <pabeni@redhat.com> wrote:
>
> This gives small but noticeable rx performance improvement (2-3%)
> and will allow exploiting future napi improvement.
>
> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
> ---
Worked in my tests, though the performance win was in the noise (+0.6%
- +1% bandwidth).
What tests did you see a 2-3% win on?
Do you think its worth modifying add_recvbuf_small() to use
napi_alloc_skb() when called from
Rx NAPI (virtnet_receive)?
Tested-by: Venkatesh Srinivas <venkateshs@google.com>
Thanks,
-- vs;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] virtio_net: replace netdev_alloc_skb_ip_align() with napi_alloc_skb()
2016-03-18 1:01 ` Venkatesh Srinivas via Virtualization
@ 2016-03-18 8:21 ` Paolo Abeni
0 siblings, 0 replies; 4+ messages in thread
From: Paolo Abeni @ 2016-03-18 8:21 UTC (permalink / raw)
To: Venkatesh Srinivas
Cc: netdev, Michael S. Tsirkin, Hannes Frederic Sowa, virtualization
On Thu, 2016-03-17 at 18:01 -0700, Venkatesh Srinivas wrote:
> On Thu, Mar 17, 2016 at 7:44 AM, Paolo Abeni <pabeni@redhat.com> wrote:
> >
> > This gives small but noticeable rx performance improvement (2-3%)
> > and will allow exploiting future napi improvement.
> >
> > Signed-off-by: Paolo Abeni <pabeni@redhat.com>
> > ---
>
> Worked in my tests, though the performance win was in the noise (+0.6%
> - +1% bandwidth).
> What tests did you see a 2-3% win on?
I'm doing net2VM tests (i.e. the traffic generator is on a different
host) with guest tuned a bit for performance. i.e. cpu pinning, no
iptables, no dhclient (yes, that makes a big difference:
http://lists.openwall.net/netdev/2013/10/29/5)
> Do you think its worth modifying add_recvbuf_small() to use
> napi_alloc_skb() when called from
> Rx NAPI (virtnet_receive)?
Oops, I missed that invocation. Probably that path is not hit in my
test. I think it should be really worthy.
I'll send a v2.
The important thing, more than the current improvement, is allowing the
virtio_net driver to leverage future napi allocation improvement (i.e.
bulk alloc: http://www.spinics.net/lists/netdev/msg367568.html) which
should be a real win.
Paolo
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-03-18 8:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-17 14:44 [PATCH net-next] virtio_net: replace netdev_alloc_skb_ip_align() with napi_alloc_skb() Paolo Abeni
2016-03-18 1:00 ` Venkatesh Srinivas via Virtualization
2016-03-18 1:01 ` Venkatesh Srinivas via Virtualization
2016-03-18 8:21 ` Paolo Abeni
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.