]> git.baikalelectronics.ru Git - kernel.git/commit
vhost_net: conditionally enable tx polling
authorJason Wang <jasowang@redhat.com>
Mon, 13 Nov 2017 03:45:34 +0000 (11:45 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 15 Nov 2017 04:50:58 +0000 (13:50 +0900)
commit1b99aab437fe19c75a06dd302075484b534cd5d9
tree5e0b6f1b25d54e6bb4c57bf0ade726a01c330fbe
parentd1c90dba77930803948735c9d20a0c00892f16da
vhost_net: conditionally enable tx polling

We always poll tx for socket, this is sub optimal since this will
slightly increase the waitqueue traversing time and more important,
vhost could not benefit from commit 362175c56988 ("net-tun:
restructure tun_do_read for better sleep/wakeup efficiency") even if
we've stopped rx polling during handle_rx(), tx poll were still left
in the waitqueue.

Pktgen from a remote host to VM over mlx4 on two 2.00GHz Xeon E5-2650
shows 11.7% improvements on rx PPS. (from 1.28Mpps to 1.44Mpps)

Cc: Wei Xu <wexu@redhat.com>
Cc: Matthew Rosato <mjrosato@linux.vnet.ibm.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/vhost/net.c