search for: push_split_desc

Displaying 20 results from an estimated 30 matches for "push_split_desc".

2019 Oct 12
2
[PATCH RFC v1 2/2] vhost: batching fetches
...izeof(*vq->descs), > GFP_KERNEL); > @@ -2366,6 +2368,8 @@ static void pop_split_desc(struct vhost_virtqueue *vq) > --vq->ndescs; > } > > +#define VHOST_DESC_FLAGS (VRING_DESC_F_INDIRECT | VRING_DESC_F_WRITE | \ > + VRING_DESC_F_NEXT) > static int push_split_desc(struct vhost_virtqueue *vq, struct vring_desc *desc, u16 id) > { > struct vhost_desc *h; > @@ -2375,7 +2379,7 @@ static int push_split_desc(struct vhost_virtqueue *vq, struct vring_desc *desc, > h = &vq->descs[vq->ndescs++]; > h->addr = vhost64_to_cpu(vq, desc...
2019 Oct 12
2
[PATCH RFC v1 2/2] vhost: batching fetches
...izeof(*vq->descs), > GFP_KERNEL); > @@ -2366,6 +2368,8 @@ static void pop_split_desc(struct vhost_virtqueue *vq) > --vq->ndescs; > } > > +#define VHOST_DESC_FLAGS (VRING_DESC_F_INDIRECT | VRING_DESC_F_WRITE | \ > + VRING_DESC_F_NEXT) > static int push_split_desc(struct vhost_virtqueue *vq, struct vring_desc *desc, u16 id) > { > struct vhost_desc *h; > @@ -2375,7 +2379,7 @@ static int push_split_desc(struct vhost_virtqueue *vq, struct vring_desc *desc, > h = &vq->descs[vq->ndescs++]; > h->addr = vhost64_to_cpu(vq, desc...
2019 Oct 12
0
[PATCH RFC v1 2/2] vhost: batching fetches
...> GFP_KERNEL); > > @@ -2366,6 +2368,8 @@ static void pop_split_desc(struct vhost_virtqueue *vq) > > --vq->ndescs; > > } > > +#define VHOST_DESC_FLAGS (VRING_DESC_F_INDIRECT | VRING_DESC_F_WRITE | \ > > + VRING_DESC_F_NEXT) > > static int push_split_desc(struct vhost_virtqueue *vq, struct vring_desc *desc, u16 id) > > { > > struct vhost_desc *h; > > @@ -2375,7 +2379,7 @@ static int push_split_desc(struct vhost_virtqueue *vq, struct vring_desc *desc, > > h = &vq->descs[vq->ndescs++]; > > h->addr...
2020 Jun 03
1
[PATCH RFC 01/13] vhost: option to fetch descriptors through an independent struct
...esc.flags & cpu_to_vhost16(vq, VRING_DESC_F_INDIRECT))) { >>> + vq_err(vq, "Nested indirect descriptor: idx %d, %zx\n", >>> + i, (size_t)indirect->addr + i * sizeof desc); >>> + return -EINVAL; >>> + } >>> + >>> + push_split_desc(vq, &desc, head); >> >> The error is ignored. > See above: > > if (unlikely(vq->ndescs + count > vq->max_descs)) > > So it can't fail here, we never fetch unless there's space. > > I guess we can add a WARN_ON here. Yes. > >>...
2020 Jun 03
2
[PATCH RFC 01/13] vhost: option to fetch descriptors through an independent struct
...vq->ndescs - 1]; > +} > + > +static void pop_split_desc(struct vhost_virtqueue *vq) > +{ > + BUG_ON(!vq->ndescs); > + --vq->ndescs; > +} > + > +#define VHOST_DESC_FLAGS (VRING_DESC_F_INDIRECT | VRING_DESC_F_WRITE | \ > + VRING_DESC_F_NEXT) > +static int push_split_desc(struct vhost_virtqueue *vq, struct vring_desc *desc, u16 id) > +{ > + struct vhost_desc *h; > + > + if (unlikely(vq->ndescs >= vq->max_descs)) > + return -EINVAL; > + h = &vq->descs[vq->ndescs++]; > + h->addr = vhost64_to_cpu(vq, desc->addr); > + h-...
2020 Jun 03
2
[PATCH RFC 01/13] vhost: option to fetch descriptors through an independent struct
...vq->ndescs - 1]; > +} > + > +static void pop_split_desc(struct vhost_virtqueue *vq) > +{ > + BUG_ON(!vq->ndescs); > + --vq->ndescs; > +} > + > +#define VHOST_DESC_FLAGS (VRING_DESC_F_INDIRECT | VRING_DESC_F_WRITE | \ > + VRING_DESC_F_NEXT) > +static int push_split_desc(struct vhost_virtqueue *vq, struct vring_desc *desc, u16 id) > +{ > + struct vhost_desc *h; > + > + if (unlikely(vq->ndescs >= vq->max_descs)) > + return -EINVAL; > + h = &vq->descs[vq->ndescs++]; > + h->addr = vhost64_to_cpu(vq, desc->addr); > + h-...
2020 Jun 04
1
[PATCH RFC 07/13] vhost: format-independent API for used buffers
...can work for split and packed. > > Do you mean we should add packed ring support based on this? > For sure, this is one of the motivators for the patchset. > Somehow. But the reason I ask is that I see "split" suffix is used in patch 1 as: peek_split_desc() pop_split_desc() push_split_desc() But that suffix is not used for the new used ring API invented in this patch. Thanks
2019 Oct 12
2
[PATCH RFC v2 0/2] vhost: ring format independence
This adds infrastructure required for supporting multiple ring formats. The idea is as follows: we convert descriptors to an independent format first, and process that converting to iov later. The point is that we have a tight loop that fetches descriptors, which is good for cache utilization. This will also allow all kind of batching tricks - e.g. it seems possible to keep SMAP disabled while
2020 Feb 06
0
vhost changes (batched) in linux-next after 12/13 trigger random crashes in KVM guests after reboot
...ivers/vhost/vhost.c > +++ b/drivers/vhost/vhost.c > @@ -2125,6 +2125,8 @@ static void pop_split_desc(struct vhost_virtqueue *vq) > --vq->ndescs; > } > > +#define VHOST_DESC_FLAGS (VRING_DESC_F_INDIRECT | VRING_DESC_F_WRITE | \ > + VRING_DESC_F_NEXT) > static int push_split_desc(struct vhost_virtqueue *vq, struct vring_desc *desc, u16 id) > { > struct vhost_desc *h; > @@ -2134,7 +2136,7 @@ static int push_split_desc(struct vhost_virtqueue *vq, struct vring_desc *desc, > h = &vq->descs[vq->ndescs++]; > h->addr = vhost64_to_cpu(vq, desc-&gt...
2019 Oct 13
4
[PATCH RFC v3 0/4] vhost: ring format independence
This adds infrastructure required for supporting multiple ring formats. The idea is as follows: we convert descriptors to an independent format first, and process that converting to iov later. The point is that we have a tight loop that fetches descriptors, which is good for cache utilization. This will also allow all kind of batching tricks - e.g. it seems possible to keep SMAP disabled while
2019 Oct 11
8
[PATCH RFC v1 0/2] vhost: ring format independence
So the idea is as follows: we convert descriptors to an independent format first, and process that converting to iov later. The point is that we have a tight loop that fetches descriptors, which is good for cache utilization. This will also allow all kind of batching tricks - e.g. it seems possible to keep SMAP disabled while we are fetching multiple descriptors. And perhaps more importantly,
2019 Oct 11
8
[PATCH RFC v1 0/2] vhost: ring format independence
So the idea is as follows: we convert descriptors to an independent format first, and process that converting to iov later. The point is that we have a tight loop that fetches descriptors, which is good for cache utilization. This will also allow all kind of batching tricks - e.g. it seems possible to keep SMAP disabled while we are fetching multiple descriptors. And perhaps more importantly,
2019 Oct 11
0
[PATCH RFC v1 2/2] vhost: batching fetches
...s = kmalloc_array(vq->max_descs, sizeof(*vq->descs), GFP_KERNEL); @@ -2366,6 +2368,8 @@ static void pop_split_desc(struct vhost_virtqueue *vq) --vq->ndescs; } +#define VHOST_DESC_FLAGS (VRING_DESC_F_INDIRECT | VRING_DESC_F_WRITE | \ + VRING_DESC_F_NEXT) static int push_split_desc(struct vhost_virtqueue *vq, struct vring_desc *desc, u16 id) { struct vhost_desc *h; @@ -2375,7 +2379,7 @@ static int push_split_desc(struct vhost_virtqueue *vq, struct vring_desc *desc, h = &vq->descs[vq->ndescs++]; h->addr = vhost64_to_cpu(vq, desc->addr); h->len = vho...
2020 Jun 02
0
[PATCH RFC 01/13] vhost: option to fetch descriptors through an independent struct
...{ + BUG_ON(!vq->ndescs); + return &vq->descs[vq->ndescs - 1]; +} + +static void pop_split_desc(struct vhost_virtqueue *vq) +{ + BUG_ON(!vq->ndescs); + --vq->ndescs; +} + +#define VHOST_DESC_FLAGS (VRING_DESC_F_INDIRECT | VRING_DESC_F_WRITE | \ + VRING_DESC_F_NEXT) +static int push_split_desc(struct vhost_virtqueue *vq, struct vring_desc *desc, u16 id) +{ + struct vhost_desc *h; + + if (unlikely(vq->ndescs >= vq->max_descs)) + return -EINVAL; + h = &vq->descs[vq->ndescs++]; + h->addr = vhost64_to_cpu(vq, desc->addr); + h->len = vhost32_to_cpu(vq, desc->le...
2020 Apr 07
0
[PATCH v7 17/19] vhost: option to fetch descriptors through an independent struct
...{ + BUG_ON(!vq->ndescs); + return &vq->descs[vq->ndescs - 1]; +} + +static void pop_split_desc(struct vhost_virtqueue *vq) +{ + BUG_ON(!vq->ndescs); + --vq->ndescs; +} + +#define VHOST_DESC_FLAGS (VRING_DESC_F_INDIRECT | VRING_DESC_F_WRITE | \ + VRING_DESC_F_NEXT) +static int push_split_desc(struct vhost_virtqueue *vq, struct vring_desc *desc, u16 id) +{ + struct vhost_desc *h; + + if (unlikely(vq->ndescs >= vq->max_descs)) + return -EINVAL; + h = &vq->descs[vq->ndescs++]; + h->addr = vhost64_to_cpu(vq, desc->addr); + h->len = vhost32_to_cpu(vq, desc->le...
2020 Apr 07
0
[PATCH v8 17/19] vhost: option to fetch descriptors through an independent struct
...{ + BUG_ON(!vq->ndescs); + return &vq->descs[vq->ndescs - 1]; +} + +static void pop_split_desc(struct vhost_virtqueue *vq) +{ + BUG_ON(!vq->ndescs); + --vq->ndescs; +} + +#define VHOST_DESC_FLAGS (VRING_DESC_F_INDIRECT | VRING_DESC_F_WRITE | \ + VRING_DESC_F_NEXT) +static int push_split_desc(struct vhost_virtqueue *vq, struct vring_desc *desc, u16 id) +{ + struct vhost_desc *h; + + if (unlikely(vq->ndescs >= vq->max_descs)) + return -EINVAL; + h = &vq->descs[vq->ndescs++]; + h->addr = vhost64_to_cpu(vq, desc->addr); + h->len = vhost32_to_cpu(vq, desc->le...
2019 Oct 13
6
[PATCH RFC v4 0/5] vhost: ring format independence
This adds infrastructure required for supporting multiple ring formats. The idea is as follows: we convert descriptors to an independent format first, and process that converting to iov later. The point is that we have a tight loop that fetches descriptors, which is good for cache utilization. This will also allow all kind of batching tricks - e.g. it seems possible to keep SMAP disabled while
2020 Jun 03
0
[PATCH RFC 01/13] vhost: option to fetch descriptors through an independent struct
...+static void pop_split_desc(struct vhost_virtqueue *vq) > > +{ > > + BUG_ON(!vq->ndescs); > > + --vq->ndescs; > > +} > > + > > +#define VHOST_DESC_FLAGS (VRING_DESC_F_INDIRECT | VRING_DESC_F_WRITE | \ > > + VRING_DESC_F_NEXT) > > +static int push_split_desc(struct vhost_virtqueue *vq, struct vring_desc *desc, u16 id) > > +{ > > + struct vhost_desc *h; > > + > > + if (unlikely(vq->ndescs >= vq->max_descs)) > > + return -EINVAL; > > + h = &vq->descs[vq->ndescs++]; > > + h->addr = vhost64_t...
2019 Oct 11
0
[PATCH RFC v1 1/2] vhost: option to fetch descriptors through an independent struct
..._GPL(vhost_get_vq_desc); +static struct vhost_desc *peek_split_desc(struct vhost_virtqueue *vq) +{ + BUG_ON(!vq->ndescs); + return &vq->descs[vq->ndescs - 1]; +} + +static void pop_split_desc(struct vhost_virtqueue *vq) +{ + BUG_ON(!vq->ndescs); + --vq->ndescs; +} + +static int push_split_desc(struct vhost_virtqueue *vq, struct vring_desc *desc, u16 id) +{ + struct vhost_desc *h; + + if (unlikely(vq->ndescs >= vq->max_descs)) + return -EINVAL; + h = &vq->descs[vq->ndescs++]; + h->addr = vhost64_to_cpu(vq, desc->addr); + h->len = vhost32_to_cpu(vq, desc->le...
2020 Jan 07
6
vhost changes (batched) in linux-next after 12/13 trigger random crashes in KVM guests after reboot
On 07.01.20 10:39, Michael S. Tsirkin wrote: > On Tue, Jan 07, 2020 at 09:59:16AM +0100, Christian Borntraeger wrote: >> >> >> On 06.01.20 11:50, Michael S. Tsirkin wrote: >>> On Wed, Dec 18, 2019 at 04:59:02PM +0100, Christian Borntraeger wrote: >>>> On 18.12.19 16:10, Michael S. Tsirkin wrote: >>>>> On Wed, Dec 18, 2019 at 03:43:43PM