<quota>-1</quota>
<emulator_period>1000000</emulator_period>
<emulator_quota>-1</emulator_quota>
+ <iothread_period>1000000</iothread_period>
+ <iothread_quota>-1</iothread_quota>
<vcpusched vcpus='0-4,^3' scheduler='fifo' priority='1'/>
<iothreadsched iothreads='2' scheduler='batch'/>
</cputune>
<span class="since">Only QEMU driver support since 0.10.0</span>
</dd>
+ <dt><code>iothread_period</code></dt>
+ <dd>
+ The optional <code>iothread_period</code> element specifies the
+ enforcement interval(unit: microseconds) for IOThreads. Within
+ <code>iothread_period</code>, each IOThread of the domain will
+ not be allowed to consume more than <code>iothread_quota</code>
+ worth of runtime. The value should be in range [1000, 1000000].
+ An iothread_period with value 0 means no value.
+ <span class="since">Only QEMU driver support since 2.1.0</span>
+ </dd>
+ <dt><code>iothread_quota</code></dt>
+ <dd>
+ The optional <code>iothread_quota</code> element specifies the maximum
+ allowed bandwidth(unit: microseconds) for IOThreads. A domain with
+ <code>iothread_quota</code> as any negative value indicates that the
+ domain IOThreads have infinite bandwidth, which means that it is
+ not bandwidth controlled. The value should be in range
+ [1000, 18446744073709551] or less than 0. An <code>iothread_quota</code>
+ with value 0 means no value. You can use this feature to ensure that
+ all IOThreads run at the same speed.
+ <span class="since">Only QEMU driver support since 2.1.0</span>
+ </dd>
+
<dt><code>vcpusched</code> and <code>iothreadsched</code></dt>
<dd>
The optional <code>vcpusched</code> elements specifies the scheduler
<ref name="cpuquota"/>
</element>
</optional>
+ <optional>
+ <element name="iothread_period">
+ <ref name="cpuperiod"/>
+ </element>
+ </optional>
+ <optional>
+ <element name="iothread_quota">
+ <ref name="cpuquota"/>
+ </element>
+ </optional>
<zeroOrMore>
<element name="vcpupin">
<attribute name="vcpu">
*/
# define VIR_DOMAIN_SCHEDULER_EMULATOR_QUOTA "emulator_quota"
+/**
+ * VIR_DOMAIN_SCHEDULER_IOTHREAD_PERIOD:
+ *
+ * Macro represents the enforcement period for a quota, in microseconds,
+ * for IOThreads only, when using the posix scheduler, as a ullong.
+ */
+# define VIR_DOMAIN_SCHEDULER_IOTHREAD_PERIOD "iothread_period"
+
+/**
+ * VIR_DOMAIN_SCHEDULER_IOTHREAD_QUOTA:
+ *
+ * Macro represents the maximum bandwidth to be used within a period for
+ * IOThreads only, when using the posix scheduler, as an llong.
+ */
+# define VIR_DOMAIN_SCHEDULER_IOTHREAD_QUOTA "iothread_quota"
+
/**
* VIR_DOMAIN_SCHEDULER_WEIGHT:
*
*/
# define VIR_DOMAIN_TUNABLE_CPU_EMULATOR_QUOTA "cputune.emulator_quota"
+/**
+ * VIR_DOMAIN_TUNABLE_CPU_IOTHREAD_PERIOD:
+ *
+ * Macro represents the enforcement period for a quota, in microseconds, for
+ * iothreads only, when using the posix scheduler, as VIR_TYPED_PARAM_ULLONG.
+ */
+# define VIR_DOMAIN_TUNABLE_CPU_IOTHREAD_PERIOD "cputune.iothread_period"
+
+/**
+ * VIR_DOMAIN_TUNABLE_CPU_IOTHREAD_QUOTA:
+ *
+ * Macro represents the maximum bandwidth to be used within a period for
+ * iothreads only, when using the posix scheduler, as VIR_TYPED_PARAM_LLONG.
+ */
+# define VIR_DOMAIN_TUNABLE_CPU_IOTHREAD_QUOTA "cputune.iothread_quota"
+
/**
* VIR_DOMAIN_TUNABLE_BLKDEV_DISK:
*
goto error;
}
+ if (virXPathULongLong("string(./cputune/iothread_period[1])", ctxt,
+ &def->cputune.iothread_period) < -1) {
+ virReportError(VIR_ERR_XML_ERROR, "%s",
+ _("can't parse cputune iothread period value"));
+ goto error;
+ }
+
+ if (def->cputune.iothread_period > 0 &&
+ (def->cputune.iothread_period < 1000 ||
+ def->cputune.iothread_period > 1000000)) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("Value of cputune iothread_period must be in range "
+ "[1000, 1000000]"));
+ goto error;
+ }
+
+ if (virXPathLongLong("string(./cputune/iothread_quota[1])", ctxt,
+ &def->cputune.iothread_quota) < -1) {
+ virReportError(VIR_ERR_XML_ERROR, "%s",
+ _("can't parse cputune iothread quota value"));
+ goto error;
+ }
+
+ if (def->cputune.iothread_quota > 0 &&
+ (def->cputune.iothread_quota < 1000 ||
+ def->cputune.iothread_quota > 18446744073709551LL)) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("Value of cputune iothread_quota must be in range "
+ "[1000, 18446744073709551]"));
+ goto error;
+ }
+
if ((n = virXPathNodeSet("./cputune/vcpupin", ctxt, &nodes)) < 0)
goto error;
"</emulator_quota>\n",
def->cputune.emulator_quota);
+ if (def->cputune.iothread_period)
+ virBufferAsprintf(&childrenBuf, "<iothread_period>%llu"
+ "</iothread_period>\n",
+ def->cputune.iothread_period);
+
+ if (def->cputune.iothread_quota)
+ virBufferAsprintf(&childrenBuf, "<iothread_quota>%lld"
+ "</iothread_quota>\n",
+ def->cputune.iothread_quota);
+
for (i = 0; i < def->maxvcpus; i++) {
char *cpumask;
virDomainVcpuDefPtr vcpu = def->vcpus[i];
long long global_quota;
unsigned long long emulator_period;
long long emulator_quota;
+ unsigned long long iothread_period;
+ long long iothread_quota;
virBitmapPtr emulatorpin;
};
<quota>-1</quota>
<global_period>1000000</global_period>
<global_quota>-1</global_quota>
+ <iothread_period>1000000</iothread_period>
+ <iothread_quota>-1</iothread_quota>
<vcpupin vcpu='0' cpuset='0'/>
<vcpupin vcpu='1' cpuset='1'/>
<emulatorpin cpuset='1'/>
<quota>-1</quota>
<global_period>1000000</global_period>
<global_quota>-1</global_quota>
+ <iothread_period>1000000</iothread_period>
+ <iothread_quota>-1</iothread_quota>
<vcpupin vcpu='0' cpuset='0'/>
<vcpupin vcpu='1' cpuset='1'/>
<emulatorpin cpuset='1'/>
LXC (posix scheduler) : cpu_shares, vcpu_period, vcpu_quota
QEMU/KVM (posix scheduler): cpu_shares, vcpu_period, vcpu_quota,
-emulator_period, emulator_quota
+emulator_period, emulator_quota, iothread_quota, iothread_period
Xen (credit scheduler): weight, cap
B<Note>: The weight and cap parameters are defined only for the
XEN_CREDIT scheduler and are now I<DEPRECATED>.
-B<Note>: The vcpu_period/emulator_period parameters have a valid value range
-of 1000-1000000 or 0, and the vcpu_quota/emulator_quota parameters have a
-valid value range of 1000-18446744073709551 or less than 0. The value 0 for
+B<Note>: The vcpu_period, emulator_period, and iothread_period parameters
+have a valid value range of 1000-1000000 or 0, and the vcpu_quota,
+emulator_quota, and iothread_quota parameters have a valid value range of
+1000-18446744073709551 or less than 0. The value 0 for
either parameter is the same as not specifying that parameter.
=item B<screenshot> I<domain> [I<imagefilepath>] [I<--screen> B<screenID>]