search for: virtqueue_enable_cb_delayed_packed

Displaying 20 results from an estimated 86 matches for "virtqueue_enable_cb_delayed_packed".

2019 Oct 25
1
[PATCH] virtio_ring: fix packed ring event may missing
...ment. Tx queue will be stopped if there's not > enough freed buffers after recheck. > > Signed-off-by: Marvin Liu <yong.liu at intel.com> So as I wrote separately, I don't think the patch is correct. And it doesn't look like it was tested properly. However, I do think virtqueue_enable_cb_delayed_packed is implemented incorrectly in case of chained s/g and ring that is close to being full. It's just that chained only happens on OOM at the moment, so it's hard to trigger. virtio_ring.c can be hacked to force chained to make it trigger more. And with napi_tx the default this function is bar...
2018 Sep 07
2
[virtio-dev] Re: [PATCH net-next v2 0/5] virtio: support packed ring
...; > > Both of ping and netperf worked as expected. > > > > v1 -> v2: > > - Use READ_ONCE() to read event off_wrap and flags together (Jason); > > - Add comments related to ccw (Jason); > > > > RFC (v6) -> v1: > > - Avoid extra virtio_wmb() in virtqueue_enable_cb_delayed_packed() > > when event idx is off (Jason); > > - Fix bufs calculation in virtqueue_enable_cb_delayed_packed() (Jason); > > - Test the state of the desc at used_idx instead of last_used_idx > > in virtqueue_enable_cb_delayed_packed() (Jason); > > - Save wrap counter (as p...
2019 Oct 27
1
[PATCH] virtio_ring: fix stalls for packed rings
From: Marvin Liu <yong.liu at intel.com> When VIRTIO_F_RING_EVENT_IDX is negotiated, virtio devices can use virtqueue_enable_cb_delayed_packed to reduce the number of device interrupts. At the moment, this is the case for virtio-net when the napi_tx module parameter is set to false. In this case, the virtio driver selects an event offset and expects that the device will send a notification when rolling over the event offset in the ring....
2018 Sep 10
3
[virtio-dev] Re: [PATCH net-next v2 0/5] virtio: support packed ring
...t; > > > > > v1 -> v2: > > > > - Use READ_ONCE() to read event off_wrap and flags together (Jason); > > > > - Add comments related to ccw (Jason); > > > > > > > > RFC (v6) -> v1: > > > > - Avoid extra virtio_wmb() in virtqueue_enable_cb_delayed_packed() > > > > when event idx is off (Jason); > > > > - Fix bufs calculation in virtqueue_enable_cb_delayed_packed() (Jason); > > > > - Test the state of the desc at used_idx instead of last_used_idx > > > > in virtqueue_enable_cb_delayed_packed() (Jas...
2018 Nov 27
0
[PATCH net-next v3 00/13] virtio: support packed ring
...values (MST); > - Drop the notify workaround for QEMU's tx-timer in packed ring (MST); > > v1 -> v2: > - Use READ_ONCE() to read event off_wrap and flags together (Jason); > - Add comments related to ccw (Jason); > > RFC v6 -> v1: > - Avoid extra virtio_wmb() in virtqueue_enable_cb_delayed_packed() > when event idx is off (Jason); > - Fix bufs calculation in virtqueue_enable_cb_delayed_packed() (Jason); > - Test the state of the desc at used_idx instead of last_used_idx > in virtqueue_enable_cb_delayed_packed() (Jason); > - Save wrap counter (as part of queue state) in th...
2018 Sep 11
2
[virtio-dev] Re: [PATCH net-next v2 0/5] virtio: support packed ring
...; > > > > - Use READ_ONCE() to read event off_wrap and flags together (Jason); > > > > > > - Add comments related to ccw (Jason); > > > > > > > > > > > > RFC (v6) -> v1: > > > > > > - Avoid extra virtio_wmb() in virtqueue_enable_cb_delayed_packed() > > > > > > when event idx is off (Jason); > > > > > > - Fix bufs calculation in virtqueue_enable_cb_delayed_packed() (Jason); > > > > > > - Test the state of the desc at used_idx instead of last_used_idx > > > > > > in...
2018 Nov 21
0
[PATCH net-next v3 00/13] virtio: support packed ring
...values (MST); > - Drop the notify workaround for QEMU's tx-timer in packed ring (MST); > > v1 -> v2: > - Use READ_ONCE() to read event off_wrap and flags together (Jason); > - Add comments related to ccw (Jason); > > RFC v6 -> v1: > - Avoid extra virtio_wmb() in virtqueue_enable_cb_delayed_packed() > when event idx is off (Jason); > - Fix bufs calculation in virtqueue_enable_cb_delayed_packed() (Jason); > - Test the state of the desc at used_idx instead of last_used_idx > in virtqueue_enable_cb_delayed_packed() (Jason); > - Save wrap counter (as part of queue state) in th...
2019 Oct 25
1
[PATCH] virtio_ring: fix packed ring event may missing
...ed-off-by: Marvin Liu <yong.liu at intel.com> > > diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c > index bdc08244a648..a8041e451e9e 100644 > --- a/drivers/virtio/virtio_ring.c > +++ b/drivers/virtio/virtio_ring.c > @@ -1499,9 +1499,6 @@ static bool virtqueue_enable_cb_delayed_packed(struct virtqueue *_vq) > * counter first before updating event flags. > */ > virtio_wmb(vq->weak_barriers); > - } else { > - used_idx = vq->last_used_idx; > - wrap_counter = vq->packed.used_wrap_counter; > } Is all this theorectical? Or did you actuall...
2018 Sep 07
0
[virtio-dev] Re: [PATCH net-next v2 0/5] virtio: support packed ring
...rf worked as expected. > > > > > > v1 -> v2: > > > - Use READ_ONCE() to read event off_wrap and flags together (Jason); > > > - Add comments related to ccw (Jason); > > > > > > RFC (v6) -> v1: > > > - Avoid extra virtio_wmb() in virtqueue_enable_cb_delayed_packed() > > > when event idx is off (Jason); > > > - Fix bufs calculation in virtqueue_enable_cb_delayed_packed() (Jason); > > > - Test the state of the desc at used_idx instead of last_used_idx > > > in virtqueue_enable_cb_delayed_packed() (Jason); > > >...
2019 Oct 27
0
[PATCH] virtio_ring: fix packed ring event may missing
...ing last > used index as replacement. Tx queue will be stopped if there's not > enough freed buffers after recheck. > > Signed-off-by: Marvin Liu <yong.liu at intel.com> OK I rewrote the commit log slightly: When VIRTIO_F_RING_EVENT_IDX is negotiated, virtio devices can use virtqueue_enable_cb_delayed_packed to reduce the number of device interrupts. At the moment, this is the case for virtio-net when the napi_tx module parameter is set to false. In this case, the virtio driver selects an event offset in the ring and expects that the device will send a notification when rolling over the event offset...
2018 Sep 10
0
[virtio-dev] Re: [PATCH net-next v2 0/5] virtio: support packed ring
...gt; >>>>> v1 -> v2: >>>>> - Use READ_ONCE() to read event off_wrap and flags together (Jason); >>>>> - Add comments related to ccw (Jason); >>>>> >>>>> RFC (v6) -> v1: >>>>> - Avoid extra virtio_wmb() in virtqueue_enable_cb_delayed_packed() >>>>> when event idx is off (Jason); >>>>> - Fix bufs calculation in virtqueue_enable_cb_delayed_packed() (Jason); >>>>> - Test the state of the desc at used_idx instead of last_used_idx >>>>> in virtqueue_enable_cb_delayed_packed(...
2018 Nov 21
1
[PATCH net-next v3 00/13] virtio: support packed ring
...fy workaround for QEMU's tx-timer in packed ring (MST); > > > > v1 -> v2: > > - Use READ_ONCE() to read event off_wrap and flags together (Jason); > > - Add comments related to ccw (Jason); > > > > RFC v6 -> v1: > > - Avoid extra virtio_wmb() in virtqueue_enable_cb_delayed_packed() > > when event idx is off (Jason); > > - Fix bufs calculation in virtqueue_enable_cb_delayed_packed() (Jason); > > - Test the state of the desc at used_idx instead of last_used_idx > > in virtqueue_enable_cb_delayed_packed() (Jason); > > - Save wrap counter (as p...
2018 Sep 12
0
[virtio-dev] Re: [PATCH net-next v2 0/5] virtio: support packed ring
...; - Use READ_ONCE() to read event off_wrap and flags together (Jason); > > > > > > > - Add comments related to ccw (Jason); > > > > > > > > > > > > > > RFC (v6) -> v1: > > > > > > > - Avoid extra virtio_wmb() in virtqueue_enable_cb_delayed_packed() > > > > > > > when event idx is off (Jason); > > > > > > > - Fix bufs calculation in virtqueue_enable_cb_delayed_packed() (Jason); > > > > > > > - Test the state of the desc at used_idx instead of last_used_idx > > > >...
2019 Oct 24
1
[PATCH] virtio_ring: fix packed ring event may missing
.../virtio_ring.c >> b/drivers/virtio/virtio_ring.c >>>>> index bdc08244a648..a8041e451e9e 100644 >>>>> --- a/drivers/virtio/virtio_ring.c >>>>> +++ b/drivers/virtio/virtio_ring.c >>>>> @@ -1499,9 +1499,6 @@ static bool >>>> virtqueue_enable_cb_delayed_packed(struct virtqueue *_vq) >>>>> * counter first before updating event flags. >>>>> */ >>>>> virtio_wmb(vq->weak_barriers); >>>>> - } else { >>>>> - used_idx = vq->last_used_idx; >>>>> -...
2019 Oct 22
0
[PATCH] virtio_ring: fix packed ring event may missing
...ned-off-by: Marvin Liu <yong.liu at intel.com> > > diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c > index bdc08244a648..a8041e451e9e 100644 > --- a/drivers/virtio/virtio_ring.c > +++ b/drivers/virtio/virtio_ring.c > @@ -1499,9 +1499,6 @@ static bool virtqueue_enable_cb_delayed_packed(struct virtqueue *_vq) > * counter first before updating event flags. > */ > virtio_wmb(vq->weak_barriers); > - } else { > - used_idx = vq->last_used_idx; > - wrap_counter = vq->packed.used_wrap_counter; > } > > if (vq->packed.event_fl...
2018 May 08
2
[RFC v3 4/5] virtio_ring: add event idx support in packed ring
...16 d1, d2; > > ??? if (wrap != vq->used_wrap_counter) > ??? ??? d1 = new + vq->num - off - 1; Just to draw your attention (maybe you have already noticed this). In this case (i.e. wrap != vq->used_wrap_counter), it's also possible that (off < new) is true. Because, when virtqueue_enable_cb_delayed_packed() is used, `off` is calculated in driver in a way like this: off = vq->last_used_idx + bufs; if (off >= vq->vring_packed.num) { off -= vq->vring_packed.num; wrap_counter ^= 1; } And when `new` (in vhost) is close to vq->num. The vq->last_used_idx + bufs (in driver) can be...
2018 May 08
2
[RFC v3 4/5] virtio_ring: add event idx support in packed ring
...16 d1, d2; > > ??? if (wrap != vq->used_wrap_counter) > ??? ??? d1 = new + vq->num - off - 1; Just to draw your attention (maybe you have already noticed this). In this case (i.e. wrap != vq->used_wrap_counter), it's also possible that (off < new) is true. Because, when virtqueue_enable_cb_delayed_packed() is used, `off` is calculated in driver in a way like this: off = vq->last_used_idx + bufs; if (off >= vq->vring_packed.num) { off -= vq->vring_packed.num; wrap_counter ^= 1; } And when `new` (in vhost) is close to vq->num. The vq->last_used_idx + bufs (in driver) can be...
2019 Oct 22
0
[PATCH] virtio_ring: fix packed ring event may missing
...>> >>> diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c >>> index bdc08244a648..a8041e451e9e 100644 >>> --- a/drivers/virtio/virtio_ring.c >>> +++ b/drivers/virtio/virtio_ring.c >>> @@ -1499,9 +1499,6 @@ static bool >> virtqueue_enable_cb_delayed_packed(struct virtqueue *_vq) >>> * counter first before updating event flags. >>> */ >>> virtio_wmb(vq->weak_barriers); >>> - } else { >>> - used_idx = vq->last_used_idx; >>> - wrap_counter = vq->packed.used_wrap_counter; &...
2018 Sep 13
2
[virtio-dev] Re: [PATCH net-next v2 0/5] virtio: support packed ring
...to read event off_wrap and flags together (Jason); > > > > > > > > - Add comments related to ccw (Jason); > > > > > > > > > > > > > > > > RFC (v6) -> v1: > > > > > > > > - Avoid extra virtio_wmb() in virtqueue_enable_cb_delayed_packed() > > > > > > > > when event idx is off (Jason); > > > > > > > > - Fix bufs calculation in virtqueue_enable_cb_delayed_packed() (Jason); > > > > > > > > - Test the state of the desc at used_idx instead of last_used_idx >...
2018 May 08
2
[RFC v3 4/5] virtio_ring: add event idx support in packed ring
...1; > > Just to draw your attention (maybe you have already > > noticed this). > > I miss this, thanks! > > > > > In this case (i.e. wrap != vq->used_wrap_counter), > > it's also possible that (off < new) is true. Because, > > > > when virtqueue_enable_cb_delayed_packed() is used, > > `off` is calculated in driver in a way like this: > > > > off = vq->last_used_idx + bufs; > > if (off >= vq->vring_packed.num) { > > off -= vq->vring_packed.num; > > wrap_counter ^= 1; > > } > > > > And when `...