Re: [PATCH net-next RFC 2/5] vhost: introduce helper to prefetch desc index

2017-09-28 Thread Jason Wang
On 2017年09月28日 08:47, Willem de Bruijn wrote: On Fri, Sep 22, 2017 at 4:02 AM, Jason Wang wrote: This patch introduces vhost_prefetch_desc_indices() which could batch descriptor indices fetching and used ring updating. This intends to reduce the cache misses of indices

Re: [PATCH net-next RFC 2/5] vhost: introduce helper to prefetch desc index

2017-09-28 Thread Jason Wang
On 2017年09月28日 06:57, Michael S. Tsirkin wrote: On Wed, Sep 27, 2017 at 08:35:47AM +0800, Jason Wang wrote: On 2017年09月27日 03:19, Michael S. Tsirkin wrote: On Fri, Sep 22, 2017 at 04:02:32PM +0800, Jason Wang wrote: This patch introduces vhost_prefetch_desc_indices() which could batch

Re: [PATCH net-next RFC 2/5] vhost: introduce helper to prefetch desc index

2017-09-27 Thread Willem de Bruijn
On Fri, Sep 22, 2017 at 4:02 AM, Jason Wang wrote: > This patch introduces vhost_prefetch_desc_indices() which could batch > descriptor indices fetching and used ring updating. This intends to > reduce the cache misses of indices fetching and updating and reduce > cache line

Re: [PATCH net-next RFC 2/5] vhost: introduce helper to prefetch desc index

2017-09-27 Thread Michael S. Tsirkin
On Wed, Sep 27, 2017 at 08:35:47AM +0800, Jason Wang wrote: > > > On 2017年09月27日 03:19, Michael S. Tsirkin wrote: > > On Fri, Sep 22, 2017 at 04:02:32PM +0800, Jason Wang wrote: > > > This patch introduces vhost_prefetch_desc_indices() which could batch > > > descriptor indices fetching and used

Re: [PATCH net-next RFC 2/5] vhost: introduce helper to prefetch desc index

2017-09-26 Thread Jason Wang
On 2017年09月27日 03:19, Michael S. Tsirkin wrote: On Fri, Sep 22, 2017 at 04:02:32PM +0800, Jason Wang wrote: This patch introduces vhost_prefetch_desc_indices() which could batch descriptor indices fetching and used ring updating. This intends to reduce the cache misses of indices fetching and

Re: [PATCH net-next RFC 2/5] vhost: introduce helper to prefetch desc index

2017-09-26 Thread Michael S. Tsirkin
On Fri, Sep 22, 2017 at 04:02:32PM +0800, Jason Wang wrote: > This patch introduces vhost_prefetch_desc_indices() which could batch > descriptor indices fetching and used ring updating. This intends to > reduce the cache misses of indices fetching and updating and reduce > cache line bounce when

Re: [PATCH net-next RFC 2/5] vhost: introduce helper to prefetch desc index

2017-09-24 Thread Jason Wang
On 2017年09月22日 17:02, Stefan Hajnoczi wrote: On Fri, Sep 22, 2017 at 04:02:32PM +0800, Jason Wang wrote: diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index f87ec75..8424166d 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c @@ -2437,6 +2437,61 @@ struct

Re: [PATCH net-next RFC 2/5] vhost: introduce helper to prefetch desc index

2017-09-22 Thread Stefan Hajnoczi
On Fri, Sep 22, 2017 at 04:02:32PM +0800, Jason Wang wrote: > diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c > index f87ec75..8424166d 100644 > --- a/drivers/vhost/vhost.c > +++ b/drivers/vhost/vhost.c > @@ -2437,6 +2437,61 @@ struct vhost_msg_node *vhost_dequeue_msg(struct >

[PATCH net-next RFC 2/5] vhost: introduce helper to prefetch desc index

2017-09-22 Thread Jason Wang
This patch introduces vhost_prefetch_desc_indices() which could batch descriptor indices fetching and used ring updating. This intends to reduce the cache misses of indices fetching and updating and reduce cache line bounce when virtqueue is almost full. copy_to_user() was used in order to benefit