]> git.baikalelectronics.ru Git - kernel.git/commit
vhost_net: correctly limit the max pending buffers
authorJason Wang <jasowang@redhat.com>
Mon, 2 Sep 2013 08:41:01 +0000 (16:41 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 4 Sep 2013 02:46:58 +0000 (22:46 -0400)
commit629c1a57f281f9182545a405b9c6db354d9e3b3b
treef2ff95e8a480a9d0a4442a2f8c1851432614a5fe
parentffd199e5b3b62718aad0427161f4003b7d750641
vhost_net: correctly limit the max pending buffers

As Michael point out, We used to limit the max pending DMAs to get better cache
utilization. But it was not done correctly since it was one done when there's no
new buffers submitted from guest. Guest can easily exceeds the limitation by
keeping sending packets.

So this patch moves the check into main loop. Tests shows about 5%-10%
improvement on per cpu throughput for guest tx.

Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/vhost/net.c