On 04/01/2013 10:04 AM, Osier Yang wrote:
This introduce a new attribute "num_queues" (same with the
good name
QEMU uses) for virtio-scsi controller. An example of the XML:
<controller type='scsi' index='0' model='virtio-scsi'
num_queues='8'/>
Our XML is not consistent on whether we prefer '-' or '_' in element and
attribute names, so I guess your naming is as good as any.
The corresponding QEMU command line:
-device virtio-scsi-pci,id=scsi0,num_queues=8,bus=pci.0,addr=0x3 \
---
docs/formatdomain.html.in | 9 +++++---
docs/schemas/domaincommon.rng | 5 +++++
src/conf/domain_conf.c | 13 +++++++++++
src/conf/domain_conf.h | 1 +
src/qemu/qemu_command.c | 11 +++++++++
.../qemuxml2argv-disk-virtio-scsi-num_queues.args | 8 +++++++
.../qemuxml2argv-disk-virtio-scsi-num_queues.xml | 26 ++++++++++++++++++++++
tests/qemuxml2argvtest.c | 3 +++
tests/qemuxml2xmltest.c | 1 +
9 files changed, 74 insertions(+), 3 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 cf382e8..262f1ac 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -2092,10 +2092,13 @@
controller. A "scsi" controller has an optional
attribute <code>model</code>, which is one of "auto",
"buslogic",
"ibmvscsi", "lsilogic", "lsisas1068",
"lsisas1078", "virtio-scsi" or
- "vmpvscsi". A "usb" controller has an optional attribute
+ "vmpvscsi". The attribute <code>num_queues</code>
+ (<span class="since">1.0.5 (QEMU and KVM only)</span>) is to
specify
+ the number of queues for the controller, it should match the number
+ of vCPUs. A "usb" controller has an optional attribute
What happens if it doesn't match the number of vcpus? And if it should
match, then why must we specify it in the XML, instead of supplying the
qemu argument automatically? Did you instead mean to say that if the
attribute is not present, then the number of queues defaults to the
number of vcpus?
<code>model</code>, 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,
+ "ich9-ehci1", "ich9-uhci1", "ich9-uhci2",
"ich9-uhci3", "vt82c686b-uhci",
+ "pci-ohci" or "nec-xhci". Additionally,
Any reason you reformatted these lines?
The rest of the patch looks okay, but I want to make sure we have the
design right before committing to it in this form.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org