]> git.baikalelectronics.ru Git - kernel.git/commit
xen-netfront: always keep the Rx ring full of requests
authorDavid Vrabel <david.vrabel@citrix.com>
Wed, 22 Oct 2014 10:17:06 +0000 (11:17 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 27 Oct 2014 02:21:32 +0000 (22:21 -0400)
commitd0cad0f062eac11290d4b987c9c6e58988c11a85
tree6f79f2819816bc679e6155e32141f1a407a5f070
parent7b7a699aa320a3d4476d91187b8c20023120efe6
xen-netfront: always keep the Rx ring full of requests

A full Rx ring only requires 1 MiB of memory.  This is not enough
memory that it is useful to dynamically scale the number of Rx
requests in the ring based on traffic rates, because:

a) Even the full 1 MiB is a tiny fraction of a typically modern Linux
   VM (for example, the AWS micro instance still has 1 GiB of memory).

b) Netfront would have used up to 1 MiB already even with moderate
   data rates (there was no adjustment of target based on memory
   pressure).

c) Small VMs are going to typically have one VCPU and hence only one
   queue.

Keeping the ring full of Rx requests handles bursty traffic better
than trying to converge on an optimal number of requests to keep
filled.

On a 4 core host, an iperf -P 64 -t 60 run from dom0 to a 4 VCPU guest
improved from 5.1 Gbit/s to 5.6 Gbit/s.  Gains with more bursty
traffic are expected to be higher.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/xen-netfront.c