search for: indirect

Displaying 20 results from an estimated 5636 matches for "indirect".

2011 Nov 29
1
[PATCH] virtio-ring: Use threshold for switching to indirect descriptors
Currently if VIRTIO_RING_F_INDIRECT_DESC is enabled we will use indirect descriptors even if we have plenty of space in the ring. This means that we take a performance hit at all times due to the overhead of creating indirect descriptors. With this patch, we will use indirect descriptors only if we have less than either 16, or 12% o...
2011 Nov 29
1
[PATCH] virtio-ring: Use threshold for switching to indirect descriptors
Currently if VIRTIO_RING_F_INDIRECT_DESC is enabled we will use indirect descriptors even if we have plenty of space in the ring. This means that we take a performance hit at all times due to the overhead of creating indirect descriptors. With this patch, we will use indirect descriptors only if we have less than either 16, or 12% o...
2014 Nov 30
3
[PATCH v7 31/46] vhost: virtio 1.0 endian-ness support
...ext = desc->next; + next = vhost16_to_cpu(vq, desc->next); /* Make sure compiler knows to grab that: we don't want it changing! */ /* We will use the result as an index in an array, so most * architectures only need a compiler barrier here. */ @@ -1113,18 +1120,19 @@ static int get_indirect(struct vhost_virtqueue *vq, { struct vring_desc desc; unsigned int i = 0, count, found = 0; + u32 len = vhost32_to_cpu(vq, indirect->len); int ret; /* Sanity check */ - if (unlikely(indirect->len % sizeof desc)) { + if (unlikely(len % sizeof desc)) { vq_err(vq, "Invalid len...
2014 Nov 30
3
[PATCH v7 31/46] vhost: virtio 1.0 endian-ness support
...ext = desc->next; + next = vhost16_to_cpu(vq, desc->next); /* Make sure compiler knows to grab that: we don't want it changing! */ /* We will use the result as an index in an array, so most * architectures only need a compiler barrier here. */ @@ -1113,18 +1120,19 @@ static int get_indirect(struct vhost_virtqueue *vq, { struct vring_desc desc; unsigned int i = 0, count, found = 0; + u32 len = vhost32_to_cpu(vq, indirect->len); int ret; /* Sanity check */ - if (unlikely(indirect->len % sizeof desc)) { + if (unlikely(len % sizeof desc)) { vq_err(vq, "Invalid len...
2019 Oct 18
2
read_barrier_depends() usage in vhost.c
...ier_depends() > > following my previous patches to strengthen READ_ONCE() for Alpha [1], I > > ended up trying to decipher the read_barrier_depends() usage in the vhost > > driver: > > > > --->8 > > > > // drivers/vhost/vhost.c > > static int get_indirect(struct vhost_virtqueue *vq, > > struct iovec iov[], unsigned int iov_size, > > unsigned int *out_num, unsigned int *in_num, > > struct vhost_log *log, unsigned int *log_num, > > struct vring_desc *indirect) > > { > > [...] > > > > /* We...
2019 Oct 18
2
read_barrier_depends() usage in vhost.c
...ier_depends() > > following my previous patches to strengthen READ_ONCE() for Alpha [1], I > > ended up trying to decipher the read_barrier_depends() usage in the vhost > > driver: > > > > --->8 > > > > // drivers/vhost/vhost.c > > static int get_indirect(struct vhost_virtqueue *vq, > > struct iovec iov[], unsigned int iov_size, > > unsigned int *out_num, unsigned int *in_num, > > struct vhost_log *log, unsigned int *log_num, > > struct vring_desc *indirect) > > { > > [...] > > > > /* We...
2013 May 27
2
BUG_ON in virtio-ring.c
Dave Airlie <airlied at gmail.com> writes: > Hi Rusty, > > current virtio-ring.c has a BUG_ON in virtqueue_add that checks > total_sg > vg->vring.num, however I'm not sure it really is 100% > correct. > > If I have an indirect ring and I'm adding sgs to it and the host is > delayed (say I've got a thread consuming things from the vring and its > off doing something interesting), > I'd really like to get ENOSPC back from virtqueue_add. However if the > indirect addition fails due to free_sg being 0...
2013 May 27
2
BUG_ON in virtio-ring.c
Dave Airlie <airlied at gmail.com> writes: > Hi Rusty, > > current virtio-ring.c has a BUG_ON in virtqueue_add that checks > total_sg > vg->vring.num, however I'm not sure it really is 100% > correct. > > If I have an indirect ring and I'm adding sgs to it and the host is > delayed (say I've got a thread consuming things from the vring and its > off doing something interesting), > I'd really like to get ENOSPC back from virtqueue_add. However if the > indirect addition fails due to free_sg being 0...
2020 Jun 03
1
[PATCH RFC 01/13] vhost: option to fetch descriptors through an independent struct
On 2020/6/3 ??5:48, Michael S. Tsirkin wrote: > On Wed, Jun 03, 2020 at 03:13:56PM +0800, Jason Wang wrote: >> On 2020/6/2 ??9:05, Michael S. Tsirkin wrote: [...] >>> + >>> +static int fetch_indirect_descs(struct vhost_virtqueue *vq, >>> + struct vhost_desc *indirect, >>> + u16 head) >>> +{ >>> + struct vring_desc desc; >>> + unsigned int i = 0, count, found = 0; >>> + u32 len = indirect->len; >>> + struct iov_iter from; &g...
2023 Feb 20
2
[PATCH vhost 01/10] virtio_ring: split: refactor virtqueue_add_split() for premapped
...> + unsigned int in_sgs) > { > - struct vring_virtqueue *vq = to_vvq(_vq); > struct scatterlist *sg; > - struct vring_desc *desc; > - unsigned int i, n, avail, descs_used, prev, err_idx; > - int head; > - bool indirect; > + unsigned int n; > > - START_USE(vq); > + for (n = 0; n < out_sgs; n++) { > + for (sg = sgs[n]; sg; sg = sg_next(sg)) { > + dma_addr_t addr = vring_map_one_sg(vq, sg, DMA_TO_DEVICE); > + > + i...
2014 Oct 25
4
[LLVMdev] Indirect call site profiling
Hi All, We've been working on enhancing LLVM's instrumentation based profiling by adding indirect call target profiling support. Our goal is to add instrumentation around indirect call sites, so that we may track the frequently taken target addresses and their call frequencies. The acquired data has uses in optimization of indirect function call heavy applications. Our initial findings show t...
2010 Feb 10
1
[PATCH] virtio-spec: document indirect descriptors
Add documentation for indirect descriptors Signed-off-by: Michael S. Tsirkin <mst at redhat.com> --- virtio-spec.lyx | 118 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 114 insertions(+), 4 deletions(-) diff --git a/virtio-spec.lyx b/virtio-spec.lyx index 8062e11..b5a8fbd 100644 --- a/virtio...
2010 Feb 10
1
[PATCH] virtio-spec: document indirect descriptors
Add documentation for indirect descriptors Signed-off-by: Michael S. Tsirkin <mst at redhat.com> --- virtio-spec.lyx | 118 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 114 insertions(+), 4 deletions(-) diff --git a/virtio-spec.lyx b/virtio-spec.lyx index 8062e11..b5a8fbd 100644 --- a/virtio...
2015 Apr 17
3
[LLVMdev] RFC: Indirect Call Promotion LLVM Pass
Hi, we've implemented an indirect call promotion llvm pass. The design notes including examples are shown below. This pass complements the indirect call profile infrastructure http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-April/084271.html Your feedback and comments will be highly appreciated. Thanks, Ivan ===================...
2023 Mar 02
1
[PATCH vhost v1 01/12] virtio_ring: split: refactor virtqueue_add_split() for premapped
...-static inline int virtqueue_add_split(struct virtqueue *_vq, - struct scatterlist *sgs[], - unsigned int total_sg, - unsigned int out_sgs, - unsigned int in_sgs, - void *data, - void *ctx, - gfp_t gfp) +/* note: return NULL means no indirect that is valid. */ +static struct vring_desc *virtqueue_get_desc_split(struct vring_virtqueue *vq, + unsigned int total_sg, + unsigned int out_sgs, + void *data, + void *ctx, + gfp_t gfp) { - struct vring_virtqueue *vq = to_vvq(_vq); - struct scatterlist *sg;...
2014 Dec 01
2
[PATCH v7 31/46] vhost: virtio 1.0 endian-ness support
...gt; > Signed-off-by: Michael S. Tsirkin <mst at redhat.com> > > --- > > drivers/vhost/vhost.c | 93 +++++++++++++++++++++++++++++++-------------------- > > 1 file changed, 56 insertions(+), 37 deletions(-) > > > > > @@ -1113,18 +1120,19 @@ static int get_indirect(struct vhost_virtqueue *vq, > > { > > struct vring_desc desc; > > unsigned int i = 0, count, found = 0; > > + u32 len = vhost32_to_cpu(vq, indirect->len); > > int ret; > > > > /* Sanity check */ > > - if (unlikely(indirect->len % sizeo...
2014 Dec 01
2
[PATCH v7 31/46] vhost: virtio 1.0 endian-ness support
...gt; > Signed-off-by: Michael S. Tsirkin <mst at redhat.com> > > --- > > drivers/vhost/vhost.c | 93 +++++++++++++++++++++++++++++++-------------------- > > 1 file changed, 56 insertions(+), 37 deletions(-) > > > > > @@ -1113,18 +1120,19 @@ static int get_indirect(struct vhost_virtqueue *vq, > > { > > struct vring_desc desc; > > unsigned int i = 0, count, found = 0; > > + u32 len = vhost32_to_cpu(vq, indirect->len); > > int ret; > > > > /* Sanity check */ > > - if (unlikely(indirect->len % sizeo...
2008 Jul 24
2
[LLVMdev] Indirect Branch Representation
On Thursday 24 July 2008 01:47, Chris Lattner wrote: > On Jul 23, 2008, at 8:47 PM, kapil anand wrote: > > Specifically, I need a way to represent indirect branch instruction > > (in binary) as an equivalent LLVM instruction. With switch > > instruction , I would have to list all the possible targets and then > > initialize the corresponding instruction. I was just thinking > > whether it might be possible to have some kind of...
2020 Jun 03
2
[PATCH RFC 01/13] vhost: option to fetch descriptors through an independent struct
...q->avail = NULL; > vq->used = NULL; > @@ -368,6 +369,9 @@ static int vhost_worker(void *data) > > static void vhost_vq_free_iovecs(struct vhost_virtqueue *vq) > { > + kfree(vq->descs); > + vq->descs = NULL; > + vq->max_descs = 0; > kfree(vq->indirect); > vq->indirect = NULL; > kfree(vq->log); > @@ -384,6 +388,10 @@ static long vhost_dev_alloc_iovecs(struct vhost_dev *dev) > > for (i = 0; i < dev->nvqs; ++i) { > vq = dev->vqs[i]; > + vq->max_descs = dev->iov_limit; > + vq->descs =...
2020 Jun 03
2
[PATCH RFC 01/13] vhost: option to fetch descriptors through an independent struct
...q->avail = NULL; > vq->used = NULL; > @@ -368,6 +369,9 @@ static int vhost_worker(void *data) > > static void vhost_vq_free_iovecs(struct vhost_virtqueue *vq) > { > + kfree(vq->descs); > + vq->descs = NULL; > + vq->max_descs = 0; > kfree(vq->indirect); > vq->indirect = NULL; > kfree(vq->log); > @@ -384,6 +388,10 @@ static long vhost_dev_alloc_iovecs(struct vhost_dev *dev) > > for (i = 0; i < dev->nvqs; ++i) { > vq = dev->vqs[i]; > + vq->max_descs = dev->iov_limit; > + vq->descs =...