search for: vhost_dequeue_msg

Displaying 20 results from an estimated 28 matches for "vhost_dequeue_msg".

2017 Sep 22
1
[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: > 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 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_avai...
2017 Sep 22
1
[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: > 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 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_avai...
2017 Sep 26
2
[PATCH net-next RFC 2/5] vhost: introduce helper to prefetch desc index
...> drivers/vhost/vhost.h | 3 +++ > 2 files changed, 58 insertions(+) > > 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 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) why do you need to combine used update with prefetch? > +{ > + in...
2017 Sep 26
2
[PATCH net-next RFC 2/5] vhost: introduce helper to prefetch desc index
...> drivers/vhost/vhost.h | 3 +++ > 2 files changed, 58 insertions(+) > > 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 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) why do you need to combine used update with prefetch? > +{ > + in...
2017 Sep 28
1
[PATCH net-next RFC 2/5] vhost: introduce helper to prefetch desc index
...> drivers/vhost/vhost.h | 3 +++ > 2 files changed, 58 insertions(+) > > 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 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) > +{ > +...
2017 Sep 28
1
[PATCH net-next RFC 2/5] vhost: introduce helper to prefetch desc index
...> drivers/vhost/vhost.h | 3 +++ > 2 files changed, 58 insertions(+) > > 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 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) > +{ > +...
2017 Sep 27
1
[PATCH net-next RFC 2/5] vhost: introduce helper to prefetch desc index
...58 insertions(+) > > > > > > 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 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) > > why do you need to...
2017 Sep 27
1
[PATCH net-next RFC 2/5] vhost: introduce helper to prefetch desc index
...58 insertions(+) > > > > > > 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 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) > > why do you need to...
2017 Sep 22
0
[PATCH net-next RFC 2/5] vhost: introduce helper to prefetch desc index
...+++++++++++++++++++++++++++++++++++++++ drivers/vhost/vhost.h | 3 +++ 2 files changed, 58 insertions(+) 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 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) +{ + int ret, ret2; + u16 last_avail_idx, last_used_idx, total, copied; + __virtio16 avail_idx; + struc...
2017 Sep 27
0
[PATCH net-next RFC 2/5] vhost: introduce helper to prefetch desc index
...| 3 +++ >> 2 files changed, 58 insertions(+) >> >> 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 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) > why do you need to combine used update wi...
2020 Jul 01
5
[PATCH 0/5]
Hi all: This series tries to support batched IOTLB updating vhost-vdpa. Currently vhost-vdpa accepts userspace mapping via IOTLB API, and it can only forward one mapping to IOMMU or device through IOMMU API or dma_map(). Though set_map() is designed to have the capability to pass an rbtree based mapping to vDPA device, it's still be called at least once for each VHOST_IOTLB_UPDATE or
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
2020 Jun 18
6
[PATCH RFC 0/5] support batched IOTLB updating in vhost-vdpa
Hi all: This series tries to support batched IOTLB updating vhost-vdpa. Currently vhost-vdpa accepts userspace mapping via IOTLB API, and it can only forward one mapping to IOMMU or device through IOMMU API or dma_map(). Though set_map() is deisgend to have the capability to pass an rbtree based mapping to vDPA device, it's still be called at least once for each VHOST_IOTLB_UPDATE or
2016 Jun 22
0
[PATCH 3/3] vhost: device IOTLB API
...noblock) +{ + DEFINE_WAIT(wait); + struct vhost_msg_node *node; + ssize_t ret = 0; + unsigned size = sizeof(struct vhost_msg); + + if (iov_iter_count(to) < size) + return 0; + + while (1) { + if (!noblock) + prepare_to_wait(&dev->wait, &wait, + TASK_INTERRUPTIBLE); + + node = vhost_dequeue_msg(dev, &dev->read_list); + if (node) + break; + if (noblock) { + ret = -EAGAIN; + break; + } + if (signal_pending(current)) { + ret = -ERESTARTSYS; + break; + } + if (!dev->iotlb) { + ret = -EBADFD; + break; + } + + schedule(); + } + + if (!noblock) + finish_wait(&amp...
2019 Sep 17
0
[RFC v4 3/3] vhost: introduce mdev based hardware backend
...m) +size_t vhost_get_desc_size(struct vhost_virtqueue *vq, unsigned int num) { return sizeof(*vq->desc) * num; } +EXPORT_SYMBOL_GPL(vhost_get_desc_size); void vhost_dev_init(struct vhost_dev *dev, struct vhost_virtqueue **vqs, int nvqs, @@ -2617,6 +2617,33 @@ struct vhost_msg_node *vhost_dequeue_msg(struct vhost_dev *dev, } EXPORT_SYMBOL_GPL(vhost_dequeue_msg); +bool vhost_translate_ring_addr(struct vhost_virtqueue *vq, u64 ring_addr, + u64 len, u64 *addr) +{ + struct vhost_umem *umem = vq->umem; + struct vhost_umem_node *u; + + if (vhost_overflow(ring_addr, len)) + return fal...
2017 Mar 07
2
[PATCH] vhost: Move vhost.h to allow vhost driver out-of-tree compilation
...int log_num, u64 len); -int vq_iotlb_prefetch(struct vhost_virtqueue *vq); - -struct vhost_msg_node *vhost_new_msg(struct vhost_virtqueue *vq, int type); -void vhost_enqueue_msg(struct vhost_dev *dev, - struct list_head *head, - struct vhost_msg_node *node); -struct vhost_msg_node *vhost_dequeue_msg(struct vhost_dev *dev, - struct list_head *head); -unsigned int vhost_chr_poll(struct file *file, struct vhost_dev *dev, - poll_table *wait); -ssize_t vhost_chr_read_iter(struct vhost_dev *dev, struct iov_iter *to, - int noblock); -ssize_t vhost_chr_write_iter(struct vhost_dev *dev...
2017 Mar 07
2
[PATCH] vhost: Move vhost.h to allow vhost driver out-of-tree compilation
...int log_num, u64 len); -int vq_iotlb_prefetch(struct vhost_virtqueue *vq); - -struct vhost_msg_node *vhost_new_msg(struct vhost_virtqueue *vq, int type); -void vhost_enqueue_msg(struct vhost_dev *dev, - struct list_head *head, - struct vhost_msg_node *node); -struct vhost_msg_node *vhost_dequeue_msg(struct vhost_dev *dev, - struct list_head *head); -unsigned int vhost_chr_poll(struct file *file, struct vhost_dev *dev, - poll_table *wait); -ssize_t vhost_chr_read_iter(struct vhost_dev *dev, struct iov_iter *to, - int noblock); -ssize_t vhost_chr_write_iter(struct vhost_dev *dev...
2019 Sep 17
1
[RFC v4 3/3] vhost: introduce mdev based hardware backend
...rtqueue *vq, unsigned int num) > { > return sizeof(*vq->desc) * num; > } > +EXPORT_SYMBOL_GPL(vhost_get_desc_size); > > void vhost_dev_init(struct vhost_dev *dev, > struct vhost_virtqueue **vqs, int nvqs, > @@ -2617,6 +2617,33 @@ struct vhost_msg_node *vhost_dequeue_msg(struct vhost_dev *dev, > } > EXPORT_SYMBOL_GPL(vhost_dequeue_msg); > > +bool vhost_translate_ring_addr(struct vhost_virtqueue *vq, u64 ring_addr, > + u64 len, u64 *addr) > +{ > + struct vhost_umem *umem = vq->umem; > + struct vhost_umem_node *u; > + &gt...
2017 Mar 10
0
[PATCH] vhost: Move vhost.h to allow vhost driver out-of-tree compilation
...q_iotlb_prefetch(struct vhost_virtqueue *vq); > - > -struct vhost_msg_node *vhost_new_msg(struct vhost_virtqueue *vq, int type); > -void vhost_enqueue_msg(struct vhost_dev *dev, > - struct list_head *head, > - struct vhost_msg_node *node); > -struct vhost_msg_node *vhost_dequeue_msg(struct vhost_dev *dev, > - struct list_head *head); > -unsigned int vhost_chr_poll(struct file *file, struct vhost_dev *dev, > - poll_table *wait); > -ssize_t vhost_chr_read_iter(struct vhost_dev *dev, struct iov_iter *to, > - int noblock); > -ssize_t vhost_chr_wr...