With iothreadid's allowing any 'id' value for an iothread_id, the iothreadsched code needs a slight adjustment to allow for "any" unsigned int value in order to create the bitmap of ids that will have scheduler adjustments. Adjusted the doc description as well. Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx> --- docs/formatdomain.html.in | 16 ++++++++++++---- src/conf/domain_conf.c | 2 +- .../qemuxml2argv-cputune-iothreadsched-toomuch.xml | 3 ++- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 7af6bd7..0767a2a 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -691,10 +691,18 @@ type (values <code>batch</code>, <code>idle</code>, <code>fifo</code>, <code>rr</code>) for particular vCPU/IOThread threads (based on <code>vcpus</code> and <code>iothreads</code>, leaving out - <code>vcpus</code>/<code>iothreads</code> sets the default). For - real-time schedulers (<code>fifo</code>, <code>rr</code>), priority must - be specified as well (and is ignored for non-real-time ones). The value - range for the priority depends on the host kernel (usually 1-99). + <code>vcpus</code>/<code>iothreads</code> sets the default). Valid + <code>vcpus</code> values start at 0 through one less than the + number of vCPU's defined for the domain. Valid <code>iothreads</code> + values are described in the <code>iothreadids</code> + <a href="#elementsIOThreadsAllocation"><code>description</code></a>. + If no <code>iothreadids</code> are defined, then libvirt numbers + IOThreads from 1 to the number of <code>iothreads</code> available + for the domain. For real-time schedulers (<code>fifo</code>, + <code>rr</code>), priority must real-time schedulers + (<code>fifo</code>, <code>rr</code>), priority must be specified as + well (and is ignored for non-real-time ones). The value range + for the priority depends on the host kernel (usually 1-99). <span class="since">Since 1.2.13</span> </dd> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 083ded7..846a744 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -14327,7 +14327,7 @@ virDomainDefParseXML(xmlDocPtr xml, for (i = 0; i < def->cputune.niothreadsched; i++) { if (virDomainThreadSchedParse(nodes[i], - 1, def->iothreads, + 1, UINT_MAX, "iothreads", &def->cputune.iothreadsched[i]) < 0) goto error; diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cputune-iothreadsched-toomuch.xml b/tests/qemuxml2argvdata/qemuxml2argv-cputune-iothreadsched-toomuch.xml index 1540969..7cae303 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-cputune-iothreadsched-toomuch.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-cputune-iothreadsched-toomuch.xml @@ -13,7 +13,8 @@ <vcpupin vcpu='1' cpuset='1'/> <emulatorpin cpuset='1'/> <vcpusched vcpus='0-1' scheduler='fifo' priority='1'/> - <iothreadsched iothreads='2' scheduler='batch'/> + <iothreadsched iothreads='1' scheduler='batch'/> + <iothreadsched iothreads='2' scheduler='fifo' priority='1'/> </cputune> <os> <type arch='i686' machine='pc'>hvm</type> -- 2.1.0 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list