Patch "virtio_net: suppress cpu stall when free_unused_bufs" has been added to the 6.2-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    virtio_net: suppress cpu stall when free_unused_bufs

to the 6.2-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     virtio_net-suppress-cpu-stall-when-free_unused_bufs.patch
and it can be found in the queue-6.2 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit e637e59bead4390d2923eb3f0a6570388728443c
Author: Wenliang Wang <wangwenliang.1995@xxxxxxxxxxxxx>
Date:   Thu May 4 10:27:06 2023 +0800

    virtio_net: suppress cpu stall when free_unused_bufs
    
    [ Upstream commit f8bb5104394560e29017c25bcade4c6b7aabd108 ]
    
    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@xxxxxxxxxxxxx>
    Acked-by: Michael S. Tsirkin <mst@xxxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 0644069592211..259d54b229bf1 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -3411,12 +3411,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();
 	}
 }
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux