Skip to content

Commit 56b5e65

Browse files
Xianting Tianmstsirkin
authored andcommitted
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 f8bb510 ("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>
1 parent 7a5103b commit 56b5e65

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/char/virtio_console.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1935,6 +1935,7 @@ static void remove_vqs(struct ports_device *portdev)
19351935
flush_bufs(vq, true);
19361936
while ((buf = virtqueue_detach_unused_buf(vq)))
19371937
free_buf(buf, true);
1938+
cond_resched();
19381939
}
19391940
portdev->vdev->config->del_vqs(portdev->vdev);
19401941
kfree(portdev->in_vqs);

0 commit comments

Comments
 (0)