search for: virtqueue_enable_cb_delayed

Displaying 20 results from an estimated 314 matches for "virtqueue_enable_cb_delayed".

2014 Oct 15
2
[RFC PATCH net-next 1/6] virtio: make sure used event never go backwards
On 10/15/2014 05:34 PM, Michael S. Tsirkin wrote: > On Wed, Oct 15, 2014 at 03:25:25PM +0800, Jason Wang wrote: >> This patch checks the new event idx to make sure used event idx never >> goes back. This is used to synchronize the calls between >> virtqueue_enable_cb_delayed() and virtqueue_enable_cb(). >> >> 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> > the implication being that moving event idx back might cause some race &...
2014 Oct 15
2
[RFC PATCH net-next 1/6] virtio: make sure used event never go backwards
On 10/15/2014 05:34 PM, Michael S. Tsirkin wrote: > On Wed, Oct 15, 2014 at 03:25:25PM +0800, Jason Wang wrote: >> This patch checks the new event idx to make sure used event idx never >> goes back. This is used to synchronize the calls between >> virtqueue_enable_cb_delayed() and virtqueue_enable_cb(). >> >> 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> > the implication being that moving event idx back might cause some race &...
2014 Oct 15
2
[RFC PATCH net-next 1/6] virtio: make sure used event never go backwards
...n 10/15/2014 05:34 PM, Michael S. Tsirkin wrote: >>> On Wed, Oct 15, 2014 at 03:25:25PM +0800, Jason Wang wrote: >>>> This patch checks the new event idx to make sure used event idx never >>>> goes back. This is used to synchronize the calls between >>>> virtqueue_enable_cb_delayed() and virtqueue_enable_cb(). >>>> >>>> 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> >>> the implication being that movin...
2014 Oct 15
2
[RFC PATCH net-next 1/6] virtio: make sure used event never go backwards
...n 10/15/2014 05:34 PM, Michael S. Tsirkin wrote: >>> On Wed, Oct 15, 2014 at 03:25:25PM +0800, Jason Wang wrote: >>>> This patch checks the new event idx to make sure used event idx never >>>> goes back. This is used to synchronize the calls between >>>> virtqueue_enable_cb_delayed() and virtqueue_enable_cb(). >>>> >>>> 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> >>> the implication being that movin...
2014 Oct 15
0
[RFC PATCH net-next 1/6] virtio: make sure used event never go backwards
...rote: > On 10/15/2014 05:34 PM, Michael S. Tsirkin wrote: > > On Wed, Oct 15, 2014 at 03:25:25PM +0800, Jason Wang wrote: > >> This patch checks the new event idx to make sure used event idx never > >> goes back. This is used to synchronize the calls between > >> virtqueue_enable_cb_delayed() and virtqueue_enable_cb(). > >> > >> 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> > > the implication being that moving event idx bac...
2015 Feb 10
4
[PATCH RFC v5 net-next 1/6] virtio_ring: fix virtqueue_enable_cb() when only 1 buffers were pending
...not one. I mildly prefer to avoid the branch, by changing the calculation like so: /* Set bufs >= 1, even if there's only one pending buffer */ bufs = (bufs + 1) * 3 / 4; But it's not clear to me how much this happens. I'm happy with the patch though, as currently virtqueue_enable_cb_delayed() is the same as virtqueue_enable_cb() if there's only been one buffer added. Cheers, Rusty. > Signed-off-by: Jason Wang <jasowang at redhat.com> > --- > drivers/virtio/virtio_ring.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/...
2015 Feb 10
4
[PATCH RFC v5 net-next 1/6] virtio_ring: fix virtqueue_enable_cb() when only 1 buffers were pending
...not one. I mildly prefer to avoid the branch, by changing the calculation like so: /* Set bufs >= 1, even if there's only one pending buffer */ bufs = (bufs + 1) * 3 / 4; But it's not clear to me how much this happens. I'm happy with the patch though, as currently virtqueue_enable_cb_delayed() is the same as virtqueue_enable_cb() if there's only been one buffer added. Cheers, Rusty. > Signed-off-by: Jason Wang <jasowang at redhat.com> > --- > drivers/virtio/virtio_ring.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/...
2014 Oct 15
1
[RFC PATCH net-next 1/6] virtio: make sure used event never go backwards
This patch checks the new event idx to make sure used event idx never goes back. This is used to synchronize the calls between virtqueue_enable_cb_delayed() and virtqueue_enable_cb(). 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/virtio/virtio_ring.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a...
2014 Oct 15
1
[RFC PATCH net-next 1/6] virtio: make sure used event never go backwards
This patch checks the new event idx to make sure used event idx never goes back. This is used to synchronize the calls between virtqueue_enable_cb_delayed() and virtqueue_enable_cb(). 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/virtio/virtio_ring.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a...
2014 Oct 15
0
[RFC PATCH net-next 1/6] virtio: make sure used event never go backwards
...M, Michael S. Tsirkin wrote: > >>> On Wed, Oct 15, 2014 at 03:25:25PM +0800, Jason Wang wrote: > >>>> This patch checks the new event idx to make sure used event idx never > >>>> goes back. This is used to synchronize the calls between > >>>> virtqueue_enable_cb_delayed() and virtqueue_enable_cb(). > >>>> > >>>> 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> > >>> the imp...
2014 Oct 15
1
[RFC PATCH net-next 2/6] virtio: introduce virtio_enable_cb_avail()
...> * >> >> * This re-enables callbacks but hints to the other side to >> delay >> * interrupts all of the available buffers have been processed; > > So this is like virtqueue_enable_cb_delayed but even more > aggressive? > I think it's too agressive: it's better to wake up guest > after you are through most of buffers, but not all, > so guest and host can work in parallel. Note that: - it was only used when there are still few of free slots (which is greater than 2...
2014 Oct 15
1
[RFC PATCH net-next 2/6] virtio: introduce virtio_enable_cb_avail()
...> * >> >> * This re-enables callbacks but hints to the other side to >> delay >> * interrupts all of the available buffers have been processed; > > So this is like virtqueue_enable_cb_delayed but even more > aggressive? > I think it's too agressive: it's better to wake up guest > after you are through most of buffers, but not all, > so guest and host can work in parallel. Note that: - it was only used when there are still few of free slots (which is greater than 2...
2015 Mar 15
2
virtio-net: tx queue was stopped
...capacity = 10; //########## test code : force to call netif_stop_queue > > if (capacity < 2+MAX_SKB_FRAGS) { > netif_stop_queue(dev); So you changed code to make it think we are out of capacity, now it stops the queue. > > if (unlikely(!virtqueue_enable_cb_delayed(vi->svq))) { > /* More just got used, free them then recheck. */ > capacity += free_old_xmit_skbs(vi); > dev_warn(&dev->dev, "free_old_xmit_skbs capacity =%d MAX_SKB_FRAGS=%d", capacity, MAX_SKB_FRA...
2015 Mar 15
2
virtio-net: tx queue was stopped
...capacity = 10; //########## test code : force to call netif_stop_queue > > if (capacity < 2+MAX_SKB_FRAGS) { > netif_stop_queue(dev); So you changed code to make it think we are out of capacity, now it stops the queue. > > if (unlikely(!virtqueue_enable_cb_delayed(vi->svq))) { > /* More just got used, free them then recheck. */ > capacity += free_old_xmit_skbs(vi); > dev_warn(&dev->dev, "free_old_xmit_skbs capacity =%d MAX_SKB_FRAGS=%d", capacity, MAX_SKB_FRA...
2018 Dec 06
7
[PATCH RFC 1/2] virtio-net: bql support
...nsigned int bytes = skb->len; > + bool kick; > > /* Free up any pending old buffers before queueing new ones. */ > - free_old_xmit_skbs(sq); > + free_old_xmit_skbs(sq, txq, use_napi); > > - if (use_napi && kick) > + if (use_napi && !more) > virtqueue_enable_cb_delayed(sq->vq); > > /* timestamp packet in software */ > @@ -1552,7 +1558,7 @@ static netdev_tx_t start_xmit(struct sk_buff *skb, struct net_device *dev) > if (!use_napi && > unlikely(!virtqueue_enable_cb_delayed(sq->vq))) { > /* More just got used, f...
2018 Dec 06
7
[PATCH RFC 1/2] virtio-net: bql support
...nsigned int bytes = skb->len; > + bool kick; > > /* Free up any pending old buffers before queueing new ones. */ > - free_old_xmit_skbs(sq); > + free_old_xmit_skbs(sq, txq, use_napi); > > - if (use_napi && kick) > + if (use_napi && !more) > virtqueue_enable_cb_delayed(sq->vq); > > /* timestamp packet in software */ > @@ -1552,7 +1558,7 @@ static netdev_tx_t start_xmit(struct sk_buff *skb, struct net_device *dev) > if (!use_napi && > unlikely(!virtqueue_enable_cb_delayed(sq->vq))) { > /* More just got used, f...
2011 May 19
0
[PATCH RFC] virtio_ring: fix delayed enable cb implementation
Fix some signed/assigned mistakes in virtqueue_enable_cb_delayed by using u16 math all over. Signed-off-by: Michael S. Tsirkin <mst at redhat.com> --- I'll put this on my v1 branch as well @@ -398,7 +397,7 @@ EXPORT_SYMBOL_GPL(virtqueue_enable_cb); bool virtqueue_enable_cb_delayed(struct virtqueue *_vq) { struct vring_virtqueue *vq = to_vvq(_vq...
2011 May 19
0
[PATCH RFC] virtio_ring: fix delayed enable cb implementation
Fix some signed/assigned mistakes in virtqueue_enable_cb_delayed by using u16 math all over. Signed-off-by: Michael S. Tsirkin <mst at redhat.com> --- I'll put this on my v1 branch as well @@ -398,7 +397,7 @@ EXPORT_SYMBOL_GPL(virtqueue_enable_cb); bool virtqueue_enable_cb_delayed(struct virtqueue *_vq) { struct vring_virtqueue *vq = to_vvq(_vq...
2014 Oct 15
1
[PATCH RFC v2 2/3] virtio_net: bql
...static int virtnet_poll_tx(struct napi_struct *napi, int budget) again: __netif_tx_lock(txq, smp_processor_id()); virtqueue_disable_cb(sq->vq); - sent += free_old_xmit_skbs(sq, budget - sent); + sent += free_old_xmit_skbs(txq, sq, budget - sent); if (sent < budget) { enable_done = virtqueue_enable_cb_delayed(sq->vq); @@ -962,12 +967,13 @@ static netdev_tx_t start_xmit(struct sk_buff *skb, struct net_device *dev) struct netdev_queue *txq = netdev_get_tx_queue(dev, qnum); bool kick = !skb->xmit_more; bool stopped; + unsigned int bytes = skb->len; virtqueue_disable_cb(sq->vq); /*...
2014 Oct 15
2
[RFC PATCH net-next 2/6] virtio: introduce virtio_enable_cb_avail()
...virtqueue_enable_cb(struct virtqueue *vq); >> >> unsigned virtqueue_enable_cb_prepare(struct virtqueue *vq); >> >> +bool virtqueue_enable_cb_avail(struct virtqueue *vq); >> + >> bool virtqueue_poll(struct virtqueue *vq, unsigned); >> >> bool virtqueue_enable_cb_delayed(struct virtqueue *vq); >> -- >> 1.7.1 > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo at vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read th...