search for: free_unused_bufs

Displaying 20 results from an estimated 127 matches for "free_unused_bufs".

2023 May 05
2
[PATCH v4] virtio_net: suppress cpu stall when free_unused_bufs
On Thu, May 4, 2023 at 10:27?AM Wenliang Wang <wangwenliang.1995 at bytedance.com> wrote: > > For multi-queue and large ring-size use case, the following error > occurred when free_unused_bufs: > rcu: INFO: rcu_sched self-detected stall on CPU. > > Fixes: 986a4f4d452d ("virtio_net: multiqueue support") > Signed-off-by: Wenliang Wang <wangwenliang.1995 at bytedance.com> > --- > v2: > -add need_resched check. > -apply same logic to sq. > v3: >...
2023 May 07
1
[PATCH v4] virtio_net: suppress cpu stall when free_unused_bufs
On Fri, May 05, 2023 at 11:28:25AM +0800, Jason Wang wrote: > On Thu, May 4, 2023 at 10:27?AM Wenliang Wang > <wangwenliang.1995 at bytedance.com> wrote: > > > > For multi-queue and large ring-size use case, the following error > > occurred when free_unused_bufs: > > rcu: INFO: rcu_sched self-detected stall on CPU. > > > > Fixes: 986a4f4d452d ("virtio_net: multiqueue support") > > Signed-off-by: Wenliang Wang <wangwenliang.1995 at bytedance.com> > > --- > > v2: > > -add need_resched check. > >...
2023 May 02
0
[PATCH v3] virtio_net: suppress cpu stall when free_unused_bufs
On Sat, 2023-04-29 at 23:47 +0800, Wenliang Wang wrote: > For multi-queue and large ring-size use case, the following error > occurred when free_unused_bufs: > rcu: INFO: rcu_sched self-detected stall on CPU. > > Signed-off-by: Wenliang Wang <wangwenliang.1995 at bytedance.com> Net next is currently closed, but this patch could arguably land on the net tree - assuming Micheal agrees. In that case you should include a suitable Fixes ta...
2023 May 04
0
[PATCH v4] virtio_net: suppress cpu stall when free_unused_bufs
On Thu, May 04, 2023 at 10:27:06AM +0800, Wenliang Wang wrote: > For multi-queue and large ring-size use case, the following error > occurred when free_unused_bufs: > rcu: INFO: rcu_sched self-detected stall on CPU. > > Fixes: 986a4f4d452d ("virtio_net: multiqueue support") > Signed-off-by: Wenliang Wang <wangwenliang.1995 at bytedance.com> Acked-by: Michael S. Tsirkin <mst at redhat.com> Probably a good idea for stable, t...
2013 Dec 06
1
[PATCH 1/2] virtio-net: determine type of bufs correctly
On 12/05/2013 10:36 PM, Andrey Vagin wrote: > free_unused_bufs must check vi->mergeable_rx_bufs before > vi->big_packets, because we use this sequence in other places. > Otherwise we allocate buffer of one type, then free it as another > type. > > general protection fault: 0000 [#1] SMP > Dumping ftrace buffer: > (ftrace buffer em...
2013 Dec 06
1
[PATCH 1/2] virtio-net: determine type of bufs correctly
On 12/05/2013 10:36 PM, Andrey Vagin wrote: > free_unused_bufs must check vi->mergeable_rx_bufs before > vi->big_packets, because we use this sequence in other places. > Otherwise we allocate buffer of one type, then free it as another > type. > > general protection fault: 0000 [#1] SMP > Dumping ftrace buffer: > (ftrace buffer em...
2013 Dec 05
9
[PATCH 0/2] virtio-net: Fix two bugs on unloading the module
They can be easy to reproduce, if you try to unload virtio-net Andrey Vagin (2): virtio-net: determine type of bufs correctly virtio: delete napi objects from netdev before releasing memory drivers/net/virtio_net.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) Cc: Rusty Russell <rusty at rustcorp.com.au> Cc: "Michael S. Tsirkin" <mst at redhat.com>
2013 Dec 05
9
[PATCH 0/2] virtio-net: Fix two bugs on unloading the module
They can be easy to reproduce, if you try to unload virtio-net Andrey Vagin (2): virtio-net: determine type of bufs correctly virtio: delete napi objects from netdev before releasing memory drivers/net/virtio_net.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) Cc: Rusty Russell <rusty at rustcorp.com.au> Cc: "Michael S. Tsirkin" <mst at redhat.com>
2014 Mar 21
2
[PATCH net] virtio-net: don't free skb immediately on kick failure
We free the skb immediately on kick failure during xmit without detaching it from the virtqueue. This may lead double free for the skb during free_unused_bufs(). This patch fixes this by not freeing it on kick failure and let it to be freed through free_unused_bufs(). Fixes 67975901183799af8e93ec60e322f9e2a1940b9b ("virtio_net: verify if virtqueue_kick() succeeded"). Cc: Rusty Russell <rusty at rustcorp.com.au> Cc: Michael S. Tsirkin &l...
2014 Mar 21
2
[PATCH net] virtio-net: don't free skb immediately on kick failure
We free the skb immediately on kick failure during xmit without detaching it from the virtqueue. This may lead double free for the skb during free_unused_bufs(). This patch fixes this by not freeing it on kick failure and let it to be freed through free_unused_bufs(). Fixes 67975901183799af8e93ec60e322f9e2a1940b9b ("virtio_net: verify if virtqueue_kick() succeeded"). Cc: Rusty Russell <rusty at rustcorp.com.au> Cc: Michael S. Tsirkin &l...
2013 Dec 05
0
[PATCH 1/2] virtio-net: determine type of bufs correctly
On Thu, Dec 05, 2013 at 06:36:20PM +0400, Andrey Vagin wrote: > free_unused_bufs must check vi->mergeable_rx_bufs before > vi->big_packets, because we use this sequence in other places. > Otherwise we allocate buffer of one type, then free it as another > type. > > general protection fault: 0000 [#1] SMP > Dumping ftrace buffer: > (ftrace buffer e...
2013 Dec 05
1
[PATCH 1/2] virtio-net: determine type of bufs correctly
free_unused_bufs must check vi->mergeable_rx_bufs before vi->big_packets, because we use this sequence in other places. Otherwise we allocate buffer of one type, then free it as another type. general protection fault: 0000 [#1] SMP Dumping ftrace buffer: (ftrace buffer empty) Modules linked in: ip6table_f...
2013 Dec 27
2
[PATCH net-next RFC] virtio-net: drop rq->max and rq->num
...uf(rq, buf, len); - --rq->num; received++; } - if (rq->num < rq->max / 2) { + if (rq->vq->num_free > virtqueue_get_vring_size(rq->vq) / 2) { if (!try_fill_recv(rq, GFP_ATOMIC)) schedule_delayed_work(&vi->refill, 0); } @@ -1398,9 +1389,7 @@ static void free_unused_bufs(struct virtnet_info *vi) give_pages(&vi->rq[i], buf); else dev_kfree_skb(buf); - --vi->rq[i].num; } - BUG_ON(vi->rq[i].num != 0); } } @@ -1671,7 +1660,8 @@ static int virtnet_probe(struct virtio_device *vdev) try_fill_recv(&vi->rq[i], GFP_KERNEL);...
2013 Dec 27
2
[PATCH net-next RFC] virtio-net: drop rq->max and rq->num
...uf(rq, buf, len); - --rq->num; received++; } - if (rq->num < rq->max / 2) { + if (rq->vq->num_free > virtqueue_get_vring_size(rq->vq) / 2) { if (!try_fill_recv(rq, GFP_ATOMIC)) schedule_delayed_work(&vi->refill, 0); } @@ -1398,9 +1389,7 @@ static void free_unused_bufs(struct virtnet_info *vi) give_pages(&vi->rq[i], buf); else dev_kfree_skb(buf); - --vi->rq[i].num; } - BUG_ON(vi->rq[i].num != 0); } } @@ -1671,7 +1660,8 @@ static int virtnet_probe(struct virtio_device *vdev) try_fill_recv(&vi->rq[i], GFP_KERNEL);...
2014 Mar 24
1
[PATCH net] virtio-net: don't free skb immediately on kick failure
On 03/23/2014 07:27 PM, Michael S. Tsirkin wrote: > On Fri, Mar 21, 2014 at 04:30:01PM +0800, Jason Wang wrote: >> We free the skb immediately on kick failure during xmit without detaching it >> from the virtqueue. This may lead double free for the skb during >> free_unused_bufs(). This patch fixes this by not freeing it on kick failure and >> let it to be freed through free_unused_bufs(). >> >> Fixes 67975901183799af8e93ec60e322f9e2a1940b9b >> ("virtio_net: verify if virtqueue_kick() succeeded"). > It's not even obvious we want to...
2014 Mar 24
1
[PATCH net] virtio-net: don't free skb immediately on kick failure
On 03/23/2014 07:27 PM, Michael S. Tsirkin wrote: > On Fri, Mar 21, 2014 at 04:30:01PM +0800, Jason Wang wrote: >> We free the skb immediately on kick failure during xmit without detaching it >> from the virtqueue. This may lead double free for the skb during >> free_unused_bufs(). This patch fixes this by not freeing it on kick failure and >> let it to be freed through free_unused_bufs(). >> >> Fixes 67975901183799af8e93ec60e322f9e2a1940b9b >> ("virtio_net: verify if virtqueue_kick() succeeded"). > It's not even obvious we want to...
2014 Jan 16
2
[PATCH net-next] virtio-net: drop rq->max and rq->num
...uf(rq, buf, len); - --rq->num; received++; } - if (rq->num < rq->max / 2) { + if (rq->vq->num_free > virtqueue_get_vring_size(rq->vq) / 2) { if (!try_fill_recv(rq, GFP_ATOMIC)) schedule_delayed_work(&vi->refill, 0); } @@ -1398,9 +1389,7 @@ static void free_unused_bufs(struct virtnet_info *vi) give_pages(&vi->rq[i], buf); else dev_kfree_skb(buf); - --vi->rq[i].num; } - BUG_ON(vi->rq[i].num != 0); } } @@ -1671,7 +1660,8 @@ static int virtnet_probe(struct virtio_device *vdev) try_fill_recv(&vi->rq[i], GFP_KERNEL);...
2014 Jan 16
2
[PATCH net-next] virtio-net: drop rq->max and rq->num
...uf(rq, buf, len); - --rq->num; received++; } - if (rq->num < rq->max / 2) { + if (rq->vq->num_free > virtqueue_get_vring_size(rq->vq) / 2) { if (!try_fill_recv(rq, GFP_ATOMIC)) schedule_delayed_work(&vi->refill, 0); } @@ -1398,9 +1389,7 @@ static void free_unused_bufs(struct virtnet_info *vi) give_pages(&vi->rq[i], buf); else dev_kfree_skb(buf); - --vi->rq[i].num; } - BUG_ON(vi->rq[i].num != 0); } } @@ -1671,7 +1660,8 @@ static int virtnet_probe(struct virtio_device *vdev) try_fill_recv(&vi->rq[i], GFP_KERNEL);...
2017 Jan 02
2
[PATCH net 9/9] virtio-net: XDP support for small buffers
...-off-by: Jason Wang <jasowang at redhat.com> > --- > drivers/net/virtio_net.c | 112 ++++++++++++++++++++++++++++++++++++----------- > 1 file changed, 87 insertions(+), 25 deletions(-) > Hi Jason, I was doing some more testing on this what do you think about doing this so that free_unused_bufs() handles the buffer free with dev_kfree_skb() instead of put_page in small receive mode. Seems more correct to me. diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 783e842..27ff76c 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -1898,6 +1898,10 @@ s...
2017 Jan 02
2
[PATCH net 9/9] virtio-net: XDP support for small buffers
...-off-by: Jason Wang <jasowang at redhat.com> > --- > drivers/net/virtio_net.c | 112 ++++++++++++++++++++++++++++++++++++----------- > 1 file changed, 87 insertions(+), 25 deletions(-) > Hi Jason, I was doing some more testing on this what do you think about doing this so that free_unused_bufs() handles the buffer free with dev_kfree_skb() instead of put_page in small receive mode. Seems more correct to me. diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 783e842..27ff76c 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -1898,6 +1898,10 @@ s...