diff options
author | Wenliang Wang <wangwenliang.1995@bytedance.com> | 2023-05-04 04:27:06 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-05-05 10:30:28 +0200 |
commit | f8bb5104394560e29017c25bcade4c6b7aabd108 (patch) | |
tree | 291c0072cd9f8cb3db09f194fc3b9c702cebe8d5 /drivers | |
parent | ice: block LAN in case of VF to VF offload (diff) | |
download | linux-f8bb5104394560e29017c25bcade4c6b7aabd108.tar.xz linux-f8bb5104394560e29017c25bcade4c6b7aabd108.zip |
virtio_net: suppress cpu stall when free_unused_bufs
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@bytedance.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/virtio_net.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 8d8038538fc4..a12ae26db0e2 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -3560,12 +3560,14 @@ static void free_unused_bufs(struct virtnet_info *vi) struct virtqueue *vq = vi->sq[i].vq; while ((buf = virtqueue_detach_unused_buf(vq)) != NULL) virtnet_sq_free_unused_buf(vq, buf); + cond_resched(); } for (i = 0; i < vi->max_queue_pairs; i++) { struct virtqueue *vq = vi->rq[i].vq; while ((buf = virtqueue_detach_unused_buf(vq)) != NULL) virtnet_rq_free_unused_buf(vq, buf); + cond_resched(); } } |