Re: [PATCH net-next V2 1/3] vhost: better detection of available buffers

2017-01-03 Thread Stefan Hajnoczi
On Wed, Dec 28, 2016 at 04:09:29PM +0800, Jason Wang wrote: > 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 > - che

[PATCH net-next V2 1/3] vhost: better detection of available buffers

2016-12-28 Thread Jason Wang
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.