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

2017-01-18 Thread Michael S. Tsirkin
On Wed, Jan 18, 2017 at 03:02:01PM +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 > -

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

2017-01-17 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.