]> git.baikalelectronics.ru Git - kernel.git/commit
vhost-net: select tx zero copy dynamically
authorMichael S. Tsirkin <mst@redhat.com>
Thu, 1 Nov 2012 09:16:51 +0000 (09:16 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 3 Nov 2012 01:29:58 +0000 (21:29 -0400)
commit76cd37b432c7f6b2387f6da6227d423a0be50ac1
treef2c8d0d2ae6ef1caa474abff4430eaedb189f193
parent05ce455171192e17c16f4cdc6b8104a970365178
vhost-net: select tx zero copy dynamically

Even when vhost-net is in zero-copy transmit mode,
net core might still decide to copy the skb later
which is somewhat slower than a copy in user
context: data copy overhead is added to the cost of
page pin/unpin. The result is that enabling tx zero copy
option leads to higher CPU utilization for guest to guest
and guest to host traffic.

To fix this, suppress zero copy tx after a given number of
packets triggered late data copy. Re-enable periodically
to detect workload changes.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/vhost/net.c