diff options
author | Xianting Tian <xianting.tian@linux.alibaba.com> | 2023-06-09 21:18:16 +0800 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2023-07-03 12:15:12 -0400 |
commit | 56b5e65efe0001fb5f95e412ee4167363debfc46 (patch) | |
tree | 9eafe06dffb5dc020629c5018304dfb50b3a6ffc /drivers/char | |
parent | 7a5103b81a9628b6b66fc710d9ccdd2f2d27a58c (diff) | |
download | lwn-56b5e65efe0001fb5f95e412ee4167363debfc46.tar.gz lwn-56b5e65efe0001fb5f95e412ee4167363debfc46.zip |
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>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/virtio_console.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index b65c809a4e97..5ec4cf4ea919 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); |