From d4bf0a9378bf337f831ca12652ac238d9e8cca75 Mon Sep 17 00:00:00 2001
From: Osier Yang
Date: Sat, 6 Apr 2013 00:21:23 +0800
Subject: [PATCH] qemu: Support multiple queue virtio-scsi
This introduce a new attribute "num_queues" (same with the good name
QEMU uses) for virtio-scsi controller. An example of the XML:
The corresponding QEMU command line:
-device virtio-scsi-pci,id=scsi0,num_queues=8,bus=pci.0,addr=0x3 \
---
docs/formatdomain.html.in | 18 ++++++++-----
docs/schemas/domaincommon.rng | 5 ++++
src/conf/domain_conf.c | 13 ++++++++++
src/conf/domain_conf.h | 1 +
src/qemu/qemu_command.c | 11 ++++++++
...uxml2argv-disk-virtio-scsi-num_queues.args | 8 ++++++
...muxml2argv-disk-virtio-scsi-num_queues.xml | 26 +++++++++++++++++++
tests/qemuxml2argvtest.c | 3 +++
tests/qemuxml2xmltest.c | 1 +
9 files changed, 79 insertions(+), 7 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-scsi-num_queues.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-scsi-num_queues.xml
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index cf382e8287..2bd924133d 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -2092,13 +2092,17 @@
controller. A "scsi" controller has an optional
attribute model, which is one of "auto", "buslogic",
"ibmvscsi", "lsilogic", "lsisas1068", "lsisas1078", "virtio-scsi" or
- "vmpvscsi". A "usb" controller has an optional attribute
- model, which is one of "piix3-uhci", "piix4-uhci", "ehci",
- "ich9-ehci1", "ich9-uhci1", "ich9-uhci2", "ich9-uhci3",
- "vt82c686b-uhci", "pci-ohci" or "nec-xhci". Additionally,
- since 0.10.0, if the USB bus needs to be
- explicitly disabled for the guest, model='none' may be used.
- The PowerPC64 "spapr-vio" addresses do not have an associated controller.
+ "vmpvscsi". The attribute num_queues
+ (1.0.5 (QEMU and KVM only)) specifies
+ the number of queues for the controller. For best performance, it's
+ recommended to specify a value matching the number of vCPUs. A "usb"
+ controller has an optional attribute model, which is one
+ of "piix3-uhci", "piix4-uhci", "ehci", "ich9-ehci1", "ich9-uhci1",
+ "ich9-uhci2", "ich9-uhci3", "vt82c686b-uhci", "pci-ohci" or "nec-xhci".
+ Additionally, since 0.10.0, if the USB bus
+ needs to be explicitly disabled for the guest, model='none'
+ may be used. The PowerPC64 "spapr-vio" addresses do not have an
+ associated controller.