search for: virtqueue_enable_cb_avail

Displaying 20 results from an estimated 20 matches for "virtqueue_enable_cb_avail".

2014 Oct 15
2
[RFC PATCH net-next 2/6] virtio: introduce virtio_enable_cb_avail()
...>> } >> EXPORT_SYMBOL_GPL(virtqueue_enable_cb_prepare); >> > I see you are also changing virtqueue_enable_cb_prepare, why? This is also used to prevent it from moving the used event backwards. This may happens when we handle tx napi after we publish avail idx as used event (virtqueue_enable_cb_avail() was called). > >> +bool virtqueue_enable_cb_avail(struct virtqueue *_vq) >> +{ >> + struct vring_virtqueue *vq = to_vvq(_vq); >> + bool ret; >> + >> + START_USE(vq); >> + vq->vring.avail->flags &= ~VRING_AVAIL_F_NO_INTERRUPT; >> + vring...
2014 Oct 15
2
[RFC PATCH net-next 2/6] virtio: introduce virtio_enable_cb_avail()
...>> } >> EXPORT_SYMBOL_GPL(virtqueue_enable_cb_prepare); >> > I see you are also changing virtqueue_enable_cb_prepare, why? This is also used to prevent it from moving the used event backwards. This may happens when we handle tx napi after we publish avail idx as used event (virtqueue_enable_cb_avail() was called). > >> +bool virtqueue_enable_cb_avail(struct virtqueue *_vq) >> +{ >> + struct vring_virtqueue *vq = to_vvq(_vq); >> + bool ret; >> + >> + START_USE(vq); >> + vq->vring.avail->flags &= ~VRING_AVAIL_F_NO_INTERRUPT; >> + vring...
2014 Oct 15
1
[RFC PATCH net-next 2/6] virtio: introduce virtio_enable_cb_avail()
...irtqueue_enable_cb_prepare); >>>> >>> I see you are also changing virtqueue_enable_cb_prepare, why? >> This is also used to prevent it from moving the used event backwards. >> This may happens when we handle tx napi after we publish avail idx as >> used event (virtqueue_enable_cb_avail() was called). > So it's wrong exactly in the same way. > > But also, please document this stuff, don't put > unrelated changes in a patch called "introduce > virtqueue_enable_cb_avail". > > >>>> +bool virtqueue_enable_cb_avail(struct virtqueue *_v...
2014 Oct 15
1
[RFC PATCH net-next 2/6] virtio: introduce virtio_enable_cb_avail()
...irtqueue_enable_cb_prepare); >>>> >>> I see you are also changing virtqueue_enable_cb_prepare, why? >> This is also used to prevent it from moving the used event backwards. >> This may happens when we handle tx napi after we publish avail idx as >> used event (virtqueue_enable_cb_avail() was called). > So it's wrong exactly in the same way. > > But also, please document this stuff, don't put > unrelated changes in a patch called "introduce > virtqueue_enable_cb_avail". > > >>>> +bool virtqueue_enable_cb_avail(struct virtqueue *_v...
2014 Oct 15
1
[RFC PATCH net-next 2/6] virtio: introduce virtio_enable_cb_avail()
...q->vring) && + !vring_need_event(vring_used_event(&vq->vring), + vq->vring.avail->idx, last_used_idx)) { vring_used_event(&vq->vring) = last_used_idx; + } END_USE(vq); return last_used_idx; } EXPORT_SYMBOL_GPL(virtqueue_enable_cb_prepare); +bool virtqueue_enable_cb_avail(struct virtqueue *_vq) +{ + struct vring_virtqueue *vq = to_vvq(_vq); + bool ret; + + START_USE(vq); + vq->vring.avail->flags &= ~VRING_AVAIL_F_NO_INTERRUPT; + vring_used_event(&vq->vring) = vq->vring.avail->idx; + ret = vring_need_event(vq->vring.avail->idx, +...
2014 Oct 15
1
[RFC PATCH net-next 2/6] virtio: introduce virtio_enable_cb_avail()
...q->vring) && + !vring_need_event(vring_used_event(&vq->vring), + vq->vring.avail->idx, last_used_idx)) { vring_used_event(&vq->vring) = last_used_idx; + } END_USE(vq); return last_used_idx; } EXPORT_SYMBOL_GPL(virtqueue_enable_cb_prepare); +bool virtqueue_enable_cb_avail(struct virtqueue *_vq) +{ + struct vring_virtqueue *vq = to_vvq(_vq); + bool ret; + + START_USE(vq); + vq->vring.avail->flags &= ~VRING_AVAIL_F_NO_INTERRUPT; + vring_used_event(&vq->vring) = vq->vring.avail->idx; + ret = vring_need_event(vq->vring.avail->idx, +...
2014 Oct 15
0
[RFC PATCH net-next 2/6] virtio: introduce virtio_enable_cb_avail()
...SYMBOL_GPL(virtqueue_enable_cb_prepare); > >> > > I see you are also changing virtqueue_enable_cb_prepare, why? > > This is also used to prevent it from moving the used event backwards. > This may happens when we handle tx napi after we publish avail idx as > used event (virtqueue_enable_cb_avail() was called). So it's wrong exactly in the same way. But also, please document this stuff, don't put unrelated changes in a patch called "introduce virtqueue_enable_cb_avail". > > > >> +bool virtqueue_enable_cb_avail(struct virtqueue *_vq) > >> +{ >...
2014 Oct 15
1
[RFC PATCH net-next 6/6] virtio-net: enable tx interrupt only for the final skb in the chain
With the help of xmit_more and virtqueue_enable_cb_avail(), this patch enable tx interrupt only for the final skb in the chain if needed. This will help to mitigate tx interrupts. Cc: Rusty Russell <rusty at rustcorp.com.au> Cc: Michael S. Tsirkin <mst at redhat.com> Signed-off-by: Jason Wang <jasowang at redhat.com> --- drivers/net/v...
2014 Oct 15
0
[RFC PATCH net-next 2/6] virtio: introduce virtio_enable_cb_avail()
...vring.avail->idx, last_used_idx)) { > vring_used_event(&vq->vring) = last_used_idx; > + } > END_USE(vq); > return last_used_idx; > } > EXPORT_SYMBOL_GPL(virtqueue_enable_cb_prepare); > I see you are also changing virtqueue_enable_cb_prepare, why? > +bool virtqueue_enable_cb_avail(struct virtqueue *_vq) > +{ > + struct vring_virtqueue *vq = to_vvq(_vq); > + bool ret; > + > + START_USE(vq); > + vq->vring.avail->flags &= ~VRING_AVAIL_F_NO_INTERRUPT; > + vring_used_event(&vq->vring) = vq->vring.avail->idx; > + ret = vring_need_even...
2014 Oct 15
1
[RFC PATCH net-next 6/6] virtio-net: enable tx interrupt only for the final skb in the chain
With the help of xmit_more and virtqueue_enable_cb_avail(), this patch enable tx interrupt only for the final skb in the chain if needed. This will help to mitigate tx interrupts. Cc: Rusty Russell <rusty at rustcorp.com.au> Cc: Michael S. Tsirkin <mst at redhat.com> Signed-off-by: Jason Wang <jasowang at redhat.com> --- drivers/net/v...
2014 Oct 15
15
[RFC PATCH net-next 0/6] Always use tx interrupt for virtio-net
According to David, proper accounting and queueing (at all levels, not just TCP sockets) is more important than trying to skim a bunch of cycles by avoiding TX interrupts. Having an event to free the SKB is absolutely essential for the stack to operate correctly. This series tries to enable tx interrupt for virtio-net. The idea is simple: enable tx interrupt and schedule a tx napi to free old
2014 Oct 15
15
[RFC PATCH net-next 0/6] Always use tx interrupt for virtio-net
According to David, proper accounting and queueing (at all levels, not just TCP sockets) is more important than trying to skim a bunch of cycles by avoiding TX interrupts. Having an event to free the SKB is absolutely essential for the stack to operate correctly. This series tries to enable tx interrupt for virtio-net. The idea is simple: enable tx interrupt and schedule a tx napi to free old
2014 Oct 15
0
[RFC PATCH net-next 6/6] virtio-net: enable tx interrupt only for the final skb in the chain
On Wed, Oct 15, 2014 at 03:25:30PM +0800, Jason Wang wrote: > With the help of xmit_more and virtqueue_enable_cb_avail(), this patch > enable tx interrupt only for the final skb in the chain if > needed. This will help to mitigate tx interrupts. > > Cc: Rusty Russell <rusty at rustcorp.com.au> > Cc: Michael S. Tsirkin <mst at redhat.com> > Signed-off-by: Jason Wang <jasowang at red...
2014 Oct 15
1
[RFC PATCH net-next 6/6] virtio-net: enable tx interrupt only for the final skb in the chain
On 10/15/2014 06:22 PM, Michael S. Tsirkin wrote: > On Wed, Oct 15, 2014 at 03:25:30PM +0800, Jason Wang wrote: >> With the help of xmit_more and virtqueue_enable_cb_avail(), this patch >> enable tx interrupt only for the final skb in the chain if >> needed. This will help to mitigate tx interrupts. >> >> Cc: Rusty Russell <rusty at rustcorp.com.au> >> Cc: Michael S. Tsirkin <mst at redhat.com> >> Signed-off-by: Jason W...
2014 Oct 15
1
[RFC PATCH net-next 6/6] virtio-net: enable tx interrupt only for the final skb in the chain
On 10/15/2014 06:22 PM, Michael S. Tsirkin wrote: > On Wed, Oct 15, 2014 at 03:25:30PM +0800, Jason Wang wrote: >> With the help of xmit_more and virtqueue_enable_cb_avail(), this patch >> enable tx interrupt only for the final skb in the chain if >> needed. This will help to mitigate tx interrupts. >> >> Cc: Rusty Russell <rusty at rustcorp.com.au> >> Cc: Michael S. Tsirkin <mst at redhat.com> >> Signed-off-by: Jason W...
2014 Oct 15
2
[RFC PATCH net-next 5/6] virtio-net: enable tx interrupt
...callback on the next packet, > which is almost sure to cause an interrupt storm > on the guest. > > > I think it's a bad idea, this is why I used > enable_cb_delayed in my patch. Right, will do this, but may also need to make sure used event never goes back since we may call virtqueue_enable_cb_avail(). > > >> > + napi_schedule_prep(napi)) { >> > + virtqueue_disable_cb(sq->vq); >> > + __napi_schedule(napi); >> > + goto again; >> > + } >> > + } else { >> > + __netif_tx_unlock(txq); >> > + } >> &gt...
2014 Oct 15
2
[RFC PATCH net-next 5/6] virtio-net: enable tx interrupt
...callback on the next packet, > which is almost sure to cause an interrupt storm > on the guest. > > > I think it's a bad idea, this is why I used > enable_cb_delayed in my patch. Right, will do this, but may also need to make sure used event never goes back since we may call virtqueue_enable_cb_avail(). > > >> > + napi_schedule_prep(napi)) { >> > + virtqueue_disable_cb(sq->vq); >> > + __napi_schedule(napi); >> > + goto again; >> > + } >> > + } else { >> > + __netif_tx_unlock(txq); >> > + } >> &gt...
2014 Oct 15
0
[RFC PATCH net-next 5/6] virtio-net: enable tx interrupt
...is almost sure to cause an interrupt storm > > on the guest. > > > > > > I think it's a bad idea, this is why I used > > enable_cb_delayed in my patch. > > Right, will do this, but may also need to make sure used event never > goes back since we may call virtqueue_enable_cb_avail(). That's why my patch always calls virtqueue_enable_cb_delayed. So no need for hacks. Maybe you can review my patch and comment? > > > > > >> > + napi_schedule_prep(napi)) { > >> > + virtqueue_disable_cb(sq->vq); > >> > + __napi...
2014 Oct 15
2
[RFC PATCH net-next 5/6] virtio-net: enable tx interrupt
Orphan skb in ndo_start_xmit() breaks socket accounting and packet queuing. This in fact breaks lots of things such as pktgen and several TCP optimizations. And also make BQL can't be implemented for virtio-net. This patch tries to solve this issue by enabling tx interrupt. To avoid introducing extra spinlocks, a tx napi was scheduled to free those packets. More tx interrupt mitigation
2014 Oct 15
2
[RFC PATCH net-next 5/6] virtio-net: enable tx interrupt
Orphan skb in ndo_start_xmit() breaks socket accounting and packet queuing. This in fact breaks lots of things such as pktgen and several TCP optimizations. And also make BQL can't be implemented for virtio-net. This patch tries to solve this issue by enabling tx interrupt. To avoid introducing extra spinlocks, a tx napi was scheduled to free those packets. More tx interrupt mitigation