search for: vhost_prefetch_desc_indices

Displaying 20 results from an estimated 23 matches for "vhost_prefetch_desc_indices".

2017 Sep 26
2
[PATCH net-next RFC 2/5] vhost: introduce helper to prefetch desc index
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 virtqueue is almost full. copy_to_user() was > used in order to benefit from modern cpus that support...
2017 Sep 26
2
[PATCH net-next RFC 2/5] vhost: introduce helper to prefetch desc index
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 virtqueue is almost full. copy_to_user() was > used in order to benefit from modern cpus that support...
2017 Sep 27
1
[PATCH net-next RFC 2/5] vhost: introduce helper to prefetch desc index
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 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 t...
2017 Sep 27
1
[PATCH net-next RFC 2/5] vhost: introduce helper to prefetch desc index
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 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 t...
2017 Sep 22
0
[PATCH net-next RFC 2/5] vhost: introduce helper to prefetch desc index
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 from modern cpus that support fast string copy. Ba...
2017 Sep 27
0
[PATCH net-next RFC 2/5] vhost: introduce helper to prefetch desc index
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 updating and reduce >> cache line bounce when virtqueue is almost full. copy_to_user() was >> used in order to benefit from modern cp...
2017 Sep 28
1
[PATCH net-next RFC 2/5] vhost: introduce helper to prefetch desc index
On Fri, Sep 22, 2017 at 4:02 AM, Jason Wang <jasowang at redhat.com> 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 virtqueue is almost full. copy_to_user() was > used in order to benefit from modern cpus that support...
2017 Sep 28
1
[PATCH net-next RFC 2/5] vhost: introduce helper to prefetch desc index
On Fri, Sep 22, 2017 at 4:02 AM, Jason Wang <jasowang at redhat.com> 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 virtqueue is almost full. copy_to_user() was > used in order to benefit from modern cpus that support...
2017 Sep 22
17
[PATCH net-next RFC 0/5] batched tx processing in vhost_net
Hi: This series tries to implement basic tx batched processing. This is done by prefetching descriptor indices and update used ring in a batch. This intends to speed up used ring updating and improve the cache utilization. Test shows about ~22% improvement in tx pss. Please review. Jason Wang (5): vhost: split out ring head fetching logic vhost: introduce helper to prefetch desc index
2017 Sep 22
17
[PATCH net-next RFC 0/5] batched tx processing in vhost_net
Hi: This series tries to implement basic tx batched processing. This is done by prefetching descriptor indices and update used ring in a batch. This intends to speed up used ring updating and improve the cache utilization. Test shows about ~22% improvement in tx pss. Please review. Jason Wang (5): vhost: split out ring head fetching logic vhost: introduce helper to prefetch desc index
2017 Sep 22
1
[PATCH net-next RFC 2/5] vhost: introduce helper to prefetch desc index
...host/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 vhost_dev *dev, > } > EXPORT_SYMBOL_GPL(vhost_dequeue_msg); > > +int vhost_prefetch_desc_indices(struct vhost_virtqueue *vq, > + struct vring_used_elem *heads, > + u16 num, bool used_update) Missing doc comment. > +{ > + int ret, ret2; > + u16 last_avail_idx, last_used_idx, total, copied; > + __virtio16 avail_idx; > + struct vring_used_elem __user *used; > + int...
2017 Sep 22
1
[PATCH net-next RFC 2/5] vhost: introduce helper to prefetch desc index
...host/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 vhost_dev *dev, > } > EXPORT_SYMBOL_GPL(vhost_dequeue_msg); > > +int vhost_prefetch_desc_indices(struct vhost_virtqueue *vq, > + struct vring_used_elem *heads, > + u16 num, bool used_update) Missing doc comment. > +{ > + int ret, ret2; > + u16 last_avail_idx, last_used_idx, total, copied; > + __virtio16 avail_idx; > + struct vring_used_elem __user *used; > + int...
2017 Sep 26
2
[PATCH net-next RFC 3/5] vhost: introduce vhost_add_used_idx()
On Fri, Sep 22, 2017 at 04:02:33PM +0800, Jason Wang wrote: > This patch introduces a helper which just increase the used idx. This > will be used in pair with vhost_prefetch_desc_indices() by batching > code. > > Signed-off-by: Jason Wang <jasowang at redhat.com> > --- > drivers/vhost/vhost.c | 33 +++++++++++++++++++++++++++++++++ > drivers/vhost/vhost.h | 1 + > 2 files changed, 34 insertions(+) > > diff --git a/drivers/vhost/vhost.c b/drivers...
2017 Sep 26
2
[PATCH net-next RFC 3/5] vhost: introduce vhost_add_used_idx()
On Fri, Sep 22, 2017 at 04:02:33PM +0800, Jason Wang wrote: > This patch introduces a helper which just increase the used idx. This > will be used in pair with vhost_prefetch_desc_indices() by batching > code. > > Signed-off-by: Jason Wang <jasowang at redhat.com> > --- > drivers/vhost/vhost.c | 33 +++++++++++++++++++++++++++++++++ > drivers/vhost/vhost.h | 1 + > 2 files changed, 34 insertions(+) > > diff --git a/drivers/vhost/vhost.c b/drivers...
2017 Sep 27
2
[PATCH net-next RFC 3/5] vhost: introduce vhost_add_used_idx()
...at 08:38:24AM +0800, Jason Wang wrote: > > > On 2017?09?27? 03:13, Michael S. Tsirkin wrote: > > On Fri, Sep 22, 2017 at 04:02:33PM +0800, Jason Wang wrote: > > > This patch introduces a helper which just increase the used idx. This > > > will be used in pair with vhost_prefetch_desc_indices() by batching > > > code. > > > > > > Signed-off-by: Jason Wang <jasowang at redhat.com> > > > --- > > > drivers/vhost/vhost.c | 33 +++++++++++++++++++++++++++++++++ > > > drivers/vhost/vhost.h | 1 + > > > 2 files changed,...
2017 Sep 27
2
[PATCH net-next RFC 3/5] vhost: introduce vhost_add_used_idx()
...at 08:38:24AM +0800, Jason Wang wrote: > > > On 2017?09?27? 03:13, Michael S. Tsirkin wrote: > > On Fri, Sep 22, 2017 at 04:02:33PM +0800, Jason Wang wrote: > > > This patch introduces a helper which just increase the used idx. This > > > will be used in pair with vhost_prefetch_desc_indices() by batching > > > code. > > > > > > Signed-off-by: Jason Wang <jasowang at redhat.com> > > > --- > > > drivers/vhost/vhost.c | 33 +++++++++++++++++++++++++++++++++ > > > drivers/vhost/vhost.h | 1 + > > > 2 files changed,...
2017 Sep 22
0
[PATCH net-next RFC 3/5] vhost: introduce vhost_add_used_idx()
This patch introduces a helper which just increase the used idx. This will be used in pair with vhost_prefetch_desc_indices() by batching code. Signed-off-by: Jason Wang <jasowang at redhat.com> --- drivers/vhost/vhost.c | 33 +++++++++++++++++++++++++++++++++ drivers/vhost/vhost.h | 1 + 2 files changed, 34 insertions(+) diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 8424166d..6532cda 100644...
2017 Sep 27
0
[PATCH net-next RFC 3/5] vhost: introduce vhost_add_used_idx()
On 2017?09?27? 03:13, Michael S. Tsirkin wrote: > On Fri, Sep 22, 2017 at 04:02:33PM +0800, Jason Wang wrote: >> This patch introduces a helper which just increase the used idx. This >> will be used in pair with vhost_prefetch_desc_indices() by batching >> code. >> >> Signed-off-by: Jason Wang <jasowang at redhat.com> >> --- >> drivers/vhost/vhost.c | 33 +++++++++++++++++++++++++++++++++ >> drivers/vhost/vhost.h | 1 + >> 2 files changed, 34 insertions(+) >> >> diff --...
2017 Sep 22
0
[PATCH net-next RFC 5/5] vhost_net: basic tx virtqueue batched processing
...elease DMAs done buffers first */ if (zcopy) @@ -486,95 +492,114 @@ static void handle_tx(struct vhost_net *net) if (unlikely(vhost_exceeds_maxpend(net))) break; - head = vhost_net_tx_get_vq_desc(net, vq, vq->iov, - ARRAY_SIZE(vq->iov), - &out, &in); + avails = vhost_prefetch_desc_indices(vq, heads, batched, !zcopy); /* On error, stop handling until the next kick. */ - if (unlikely(head < 0)) + if (unlikely(avails < 0)) break; - /* Nothing new? Wait for eventfd to tell us they refilled. */ - if (head == vq->num) { + /* Nothing new? Busy poll for a while or wai...
2017 Sep 27
2
[PATCH net-next RFC 0/5] batched tx processing in vhost_net
On 2017?09?26? 21:45, Michael S. Tsirkin wrote: > On Fri, Sep 22, 2017 at 04:02:30PM +0800, Jason Wang wrote: >> Hi: >> >> This series tries to implement basic tx batched processing. This is >> done by prefetching descriptor indices and update used ring in a >> batch. This intends to speed up used ring updating and improve the >> cache utilization. >