OSDN Git Service

util: adjust coroutine pool size to virtio block queue
authorHiroki Narukawa <hnarukaw@yahoo-corp.jp>
Mon, 14 Feb 2022 11:53:02 +0000 (20:53 +0900)
committerStefan Hajnoczi <stefanha@redhat.com>
Mon, 14 Feb 2022 17:11:25 +0000 (17:11 +0000)
commit4c41c69e05fe28c0f95f8abd2ebf407e95a4f04b
treeac367ecefb05151002d999fdf4b7b18904fdf6ff
parent34deee7b6a1418f3d62a91ff0a9d156e60a788a5
util: adjust coroutine pool size to virtio block queue

Coroutine pool size was 64 from long ago, and the basis was organized in the commit message in 4d68e86b.

At that time, virtio-blk queue-size and num-queue were not configuable, and equivalent values were 128 and 1.

Coroutine pool size 64 was fine then.

Later queue-size and num-queue got configuable, and default values were increased.

Coroutine pool with size 64 exhausts frequently with random disk IO in new size, and slows down.

This commit adjusts coroutine pool size adaptively with new values.

This commit adds 64 by default, but now coroutine is not only for block devices,

and is not too much burdon comparing with new default.

pool size of 128 * vCPUs.

Signed-off-by: Hiroki Narukawa <hnarukaw@yahoo-corp.jp>
Message-id: 20220214115302.13294-2-hnarukaw@yahoo-corp.jp
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
hw/block/virtio-blk.c
include/qemu/coroutine.h
util/qemu-coroutine.c