aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXianting Tian <xianting.tian@linux.alibaba.com>2023-06-09 21:18:16 +0800
committerMichael S. Tsirkin <mst@redhat.com>2023-07-03 12:15:12 -0400
commit56b5e65efe0001fb5f95e412ee4167363debfc46 (patch)
tree9eafe06dffb5dc020629c5018304dfb50b3a6ffc
parent7a5103b81a9628b6b66fc710d9ccdd2f2d27a58c (diff)
downloadnet-next-56b5e65efe0001fb5f95e412ee4167363debfc46.tar.gz
virtio-console: call scheduler when we free unused buffs
For virtio-net we were getting CPU stall warnings, and fixed it by calling the scheduler: see f8bb51043945 ("virtio_net: suppress cpu stall when free_unused_bufs"). This driver is similar so theoretically the same logic applies. Signed-off-by: Xianting Tian <xianting.tian@linux.alibaba.com> Message-Id: <20230609131817.712867-3-xianting.tian@linux.alibaba.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-rw-r--r--drivers/char/virtio_console.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index b65c809a4e978d..5ec4cf4ea91973 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -1935,6 +1935,7 @@ static void remove_vqs(struct ports_device *portdev)
flush_bufs(vq, true);
while ((buf = virtqueue_detach_unused_buf(vq)))
free_buf(buf, true);
+ cond_resched();
}
portdev->vdev->config->del_vqs(portdev->vdev);
kfree(portdev->in_vqs);