mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
cputune: allow interleaved xml
I noticed this with the recent iothread pinning code, but the problem existed longer than that. The XML validation required users to supply <cputune> children in a strict order, even though there was no conceptual reason why they can't occur in any order. docs/ changes best viewed with -w * docs/schemas/domaincommon.rng (cputune): Add interleave. * tests/qemuxml2argvdata/qemuxml2argv-cputune-iothreads.xml: Swap up order, copying canonical form... * tests/qemuxml2xmloutdata/qemuxml2xmlout-cputune-iothreads.xml: ...here. * tests/qemuxml2xmltest.c (mymain): Mark the difference. Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
@@ -768,58 +768,60 @@
|
||||
<!-- All the cpu related tunables would go in the cputune -->
|
||||
<define name="cputune">
|
||||
<element name="cputune">
|
||||
<optional>
|
||||
<element name="shares">
|
||||
<ref name="cpushares"/>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name="period">
|
||||
<ref name="cpuperiod"/>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name="quota">
|
||||
<ref name="cpuquota"/>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name="emulator_period">
|
||||
<ref name="cpuperiod"/>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name="emulator_quota">
|
||||
<ref name="cpuquota"/>
|
||||
</element>
|
||||
</optional>
|
||||
<zeroOrMore>
|
||||
<element name="vcpupin">
|
||||
<attribute name="vcpu">
|
||||
<ref name="vcpuid"/>
|
||||
</attribute>
|
||||
<attribute name="cpuset">
|
||||
<ref name="cpuset"/>
|
||||
</attribute>
|
||||
</element>
|
||||
</zeroOrMore>
|
||||
<optional>
|
||||
<element name="emulatorpin">
|
||||
<attribute name="cpuset">
|
||||
<ref name="cpuset"/>
|
||||
</attribute>
|
||||
</element>
|
||||
</optional>
|
||||
<zeroOrMore>
|
||||
<element name="iothreadpin">
|
||||
<attribute name="iothread">
|
||||
<ref name="unsignedInt"/>
|
||||
</attribute>
|
||||
<attribute name="cpuset">
|
||||
<ref name="cpuset"/>
|
||||
</attribute>
|
||||
</element>
|
||||
</zeroOrMore>
|
||||
<interleave>
|
||||
<optional>
|
||||
<element name="shares">
|
||||
<ref name="cpushares"/>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name="period">
|
||||
<ref name="cpuperiod"/>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name="quota">
|
||||
<ref name="cpuquota"/>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name="emulator_period">
|
||||
<ref name="cpuperiod"/>
|
||||
</element>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name="emulator_quota">
|
||||
<ref name="cpuquota"/>
|
||||
</element>
|
||||
</optional>
|
||||
<zeroOrMore>
|
||||
<element name="vcpupin">
|
||||
<attribute name="vcpu">
|
||||
<ref name="vcpuid"/>
|
||||
</attribute>
|
||||
<attribute name="cpuset">
|
||||
<ref name="cpuset"/>
|
||||
</attribute>
|
||||
</element>
|
||||
</zeroOrMore>
|
||||
<optional>
|
||||
<element name="emulatorpin">
|
||||
<attribute name="cpuset">
|
||||
<ref name="cpuset"/>
|
||||
</attribute>
|
||||
</element>
|
||||
</optional>
|
||||
<zeroOrMore>
|
||||
<element name="iothreadpin">
|
||||
<attribute name="iothread">
|
||||
<ref name="unsignedInt"/>
|
||||
</attribute>
|
||||
<attribute name="cpuset">
|
||||
<ref name="cpuset"/>
|
||||
</attribute>
|
||||
</element>
|
||||
</zeroOrMore>
|
||||
</interleave>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user