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

2017-01-09 Thread Michael S. Tsirkin
On Tue, Jan 10, 2017 at 10:22:42AM +0800, Jason Wang wrote: > > > On 2017年01月10日 07:10, Michael S. Tsirkin wrote: > > On Mon, Jan 09, 2017 at 10:59:16AM +0800, Jason Wang wrote: > > > > > > On 2017年01月07日 03:55, Michael S. Tsirkin wrote: > > > > On Fri, Jan 06, 2017 at 10:13:15AM +0800, Jason Wa

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

2017-01-09 Thread Jason Wang
On 2017年01月10日 07:10, Michael S. Tsirkin wrote: On Mon, Jan 09, 2017 at 10:59:16AM +0800, Jason Wang wrote: On 2017年01月07日 03:55, Michael S. Tsirkin wrote: On Fri, Jan 06, 2017 at 10:13:15AM +0800, Jason Wang wrote: This patch tries to do several tweaks on vhost_vq_avail_empty() for a bette

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

2017-01-09 Thread Michael S. Tsirkin
On Mon, Jan 09, 2017 at 10:59:16AM +0800, Jason Wang wrote: > > > On 2017年01月07日 03:55, Michael S. Tsirkin wrote: > > On Fri, Jan 06, 2017 at 10:13:15AM +0800, Jason Wang wrote: > > > This patch tries to do several tweaks on vhost_vq_avail_empty() for a > > > better performance: > > > > > > - ch

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

2017-01-08 Thread Jason Wang
On 2017年01月07日 03:55, Michael S. Tsirkin wrote: On Fri, Jan 06, 2017 at 10:13:15AM +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()

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

2017-01-06 Thread Michael S. Tsirkin
On Fri, Jan 06, 2017 at 10:13:15AM +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 V4 net-next 1/3] vhost: better detection of available buffers

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