]> 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)
commit1ae7a0bfa371639ade59e368291b234e17e58094
treef2ff95e8a480a9d0a4442a2f8c1851432614a5fe
parentb984aadf67c71991b250ffb21eac6a037a923092
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