]> git.baikalelectronics.ru Git - kernel.git/commit
virtio-net: rx busy polling support
authorJason Wang <jasowang@redhat.com>
Wed, 23 Jul 2014 08:33:55 +0000 (16:33 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 23 Jul 2014 22:12:02 +0000 (15:12 -0700)
commit1c9b10890802a01ed250b6641640a3181223c801
tree0b55a52980362bd053ef02615bb0b7630e86e02f
parent978ab1ccad0228b747a1f37b193c30eb0e0dc6df
virtio-net: rx busy polling support

Add basic support for rx busy polling. Instead of introducing new
states and spinlock to synchronize between NAPI and polling method,
this patch just reuse NAPI state to avoid extra overhead for fast path
and simplified the codes.

Test was done between a kvm guest and an external host. Two hosts were
connected through 40gb mlx4 cards. With both busy_poll and busy_read
are set to 50 in guest, 1 byte netperf tcp_rr shows 127% improvement:
transaction rate was increased from 8353.33 to 18966.87.

Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Vlad Yasevich <vyasevic@redhat.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/virtio_net.c