summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJason Wang <jasowang@redhat.com>2017-01-18 08:02:01 +0100
committerDavid S. Miller <davem@davemloft.net>2017-01-18 22:35:29 +0100
commit275bf960ac69744430a6725a4ed7f50d36cf1441 (patch)
treebdfad9c1aeb6e8c9b111046cd4d5a5492a43bc57 /include
parentnet:add one common config ARCH_WANT_RELAX_ORDER to support relax ordering (diff)
downloadlinux-275bf960ac69744430a6725a4ed7f50d36cf1441.tar.xz
linux-275bf960ac69744430a6725a4ed7f50d36cf1441.zip
vhost: better detection of available buffers
This patch tries to do several tweaks on vhost_vq_avail_empty() for a better performance: - check cached avail index first which could avoid userspace memory access. - using unlikely() for the failure of userspace access - check vq->last_avail_idx instead of cached avail index as the last step. This patch is need for batching supports which needs to peek whether or not there's still available buffers in the ring. Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions