commit | e3b56cdd4351f0e227d4d847eeadff4c82aef1b9 | [log] [tgz] |
---|---|---|
author | Jason Wang <jasowang@redhat.com> | Tue Feb 07 15:49:50 2017 +0800 |
committer | Michael S. Tsirkin <mst@redhat.com> | Mon Feb 27 20:37:27 2017 +0200 |
tree | 45d602addb89b2cd3cf1617ecb85275dad7d3f9e | |
parent | 51be7a9a261ce18c520fb3928b168feb77522745 [diff] |
vhost: try avoiding avail index access when getting descriptor If last avail idx is not equal to cached avail idx, we're sure there's still available buffers in the virtqueue so there's no need to re-read avail idx. So let's skip this to avoid unnecessary userspace memory access and memory barrier. Pktgen test show about 3% improvement on rx pps. Signed-off-by: Jason Wang <jasowang@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>