vhost: batch used descs chains write-back with packed ring
authorMaxime Coquelin <maxime.coquelin@redhat.com>
Thu, 20 Dec 2018 16:47:55 +0000 (17:47 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 21 Dec 2018 15:22:41 +0000 (16:22 +0100)
commitb473ec1131ee44ee25e0536a04be65246b93f4f3
treeff506314dc7b802d60239e8732d67c3c2f909f65
parent517ad3e018e31ab2596d1ece5369894703c850c2
vhost: batch used descs chains write-back with packed ring

Instead of writing back descriptors chains in order, let's
write the first chain flags last in order to improve batching.

Also, move the write barrier in logging cache sync, so that it
is done only when logging is enabled. It means there is now
one more barrier for split ring when logging is enabled.

With Kernel's pktgen benchmark, ~3% performance gain is measured.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
lib/librte_vhost/vhost.h
lib/librte_vhost/virtio_net.c