From 7e9d5ae123affadb4ac1b6282fdc04bc7a83aee0 Mon Sep 17 00:00:00 2001 From: Changpeng Liu Date: Wed, 12 May 2021 21:10:54 +0800 Subject: [PATCH] doc/vhost: update example parameter when starting VM Some Linux distributions reports kernel panic using the same command line as we suggested in this document, that's because number of IO queues is bigger than number of CPUs, so here just fix it and added a comment on the number of IO queues parameter. See issues #1295 and #1737. Change-Id: Ie1e18d5e83a80523f71d98b8761d13a8d57cc9ab Signed-off-by: Changpeng Liu Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7852 Tested-by: SPDK CI Jenkins Reviewed-by: Ziye Yang Reviewed-by: John Kariuki Reviewed-by: Reviewed-by: Tomasz Zawadzki Reviewed-by: Jim Harris --- doc/vhost.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/vhost.md b/doc/vhost.md index a44454fd3..6282bbc2d 100644 --- a/doc/vhost.md +++ b/doc/vhost.md @@ -280,9 +280,9 @@ host:~# taskset -c 2,3 qemu-system-x86_64 \ -drive file=guest_os_image.qcow2,if=none,id=disk \ -device ide-hd,drive=disk,bootindex=0 \ -chardev socket,id=spdk_vhost_scsi0,path=/var/tmp/vhost.0 \ - -device vhost-user-scsi-pci,id=scsi0,chardev=spdk_vhost_scsi0,num_queues=4 \ + -device vhost-user-scsi-pci,id=scsi0,chardev=spdk_vhost_scsi0,num_queues=2 \ -chardev socket,id=spdk_vhost_blk0,path=/var/tmp/vhost.1 \ - -device vhost-user-blk-pci,chardev=spdk_vhost_blk0,num-queues=4 + -device vhost-user-blk-pci,chardev=spdk_vhost_blk0,num-queues=2 ~~~ Please note the following two commands are run on the guest VM. @@ -331,6 +331,10 @@ to set `num_queues=4` to saturate physical device. Adding too many queues might vhost performance degradation if many vhost devices are used because each device will require additional `num_queues` to be polled. +Some Linux distributions report a kernel panic when starting the VM if the number of I/O queues +specified via the `num-queues` parameter is greater than number of vCPUs. If you need to use +more I/O queues than vCPUs, check that your OS image supports that configuration. + ## Hot-attach/hot-detach {#vhost_hotattach} Hotplug/hotremove within a vhost controller is called hot-attach/detach. This is to