vhost: batch small guest memory copies
authorTiwei Bie <tiwei.bie@intel.com>
Fri, 8 Sep 2017 12:50:46 +0000 (20:50 +0800)
committerYuanhan Liu <yliu@fridaylinux.org>
Tue, 10 Oct 2017 13:48:53 +0000 (15:48 +0200)
commite5c494a7a22b6db986ac64a6ca85d3fe5e4418d0
tree8b788e487697bac49acebd587e02110cafe09b36
parent0373ab9bfca60cbc62b2f5dc9a914b5ece63ba31
vhost: batch small guest memory copies

This patch adaptively batches the small guest memory copies.
By batching the small copies, the efficiency of executing the
memory LOAD instructions can be improved greatly, because the
memory LOAD latency can be effectively hidden by the pipeline.
We saw great performance boosts for small packets PVP test.

This patch improves the performance for small packets, and has
distinguished the packets by size. So although the performance
for big packets doesn't change, it makes it relatively easy to
do some special optimizations for the big packets too.

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Signed-off-by: Zhihong Wang <zhihong.wang@intel.com>
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Tested-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
lib/librte_vhost/vhost.c
lib/librte_vhost/vhost.h
lib/librte_vhost/vhost_user.c
lib/librte_vhost/virtio_net.c