From: "Daniel P. Berrange" <berrange@xxxxxxxxxx> Split the "resource" define out into multiple smaller defines, one for each type of resource tuning parameter. This makes the schema a bit clearer to read Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx> --- docs/schemas/domaincommon.rng | 271 ++++++++++++++++++++++-------------------- 1 file changed, 144 insertions(+), 127 deletions(-) diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 454ebdb..63ba7d1 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -498,62 +498,6 @@ </element> </optional> - <!-- The Blkio cgroup related tunables would go in the blkiotune --> - <optional> - <element name="blkiotune"> - <interleave> - <!-- I/O weight the VM can use --> - <optional> - <element name="weight"> - <ref name="weight"/> - </element> - </optional> - <zeroOrMore> - <element name="device"> - <interleave> - <element name="path"> - <ref name="absFilePath"/> - </element> - <element name="weight"> - <ref name="weight"/> - </element> - </interleave> - </element> - </zeroOrMore> - </interleave> - </element> - </optional> - - <!-- All the memory/swap related tunables would go in the memtune --> - <optional> - <element name="memtune"> - <!-- Maximum memory the VM can use --> - <optional> - <element name="hard_limit"> - <ref name='scaledInteger'/> - </element> - </optional> - <!-- Minimum memory ascertained for the VM during contention --> - <optional> - <element name="soft_limit"> - <ref name='scaledInteger'/> - </element> - </optional> - <!-- Minimum amount of memory required to start the VM --> - <optional> - <element name="min_guarantee"> - <ref name='scaledInteger'/> - </element> - </optional> - <!-- Maximum swap area the VM can use --> - <optional> - <element name="swap_hard_limit"> - <ref name='scaledInteger'/> - </element> - </optional> - </element> - </optional> - <optional> <element name="vcpu"> <optional> @@ -578,91 +522,164 @@ </element> </optional> - <!-- All the cpu related tunables would go in the cputune --> <optional> - <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> + <ref name="blkiotune"/> + </optional> + + <optional> + <ref name="memtune"/> + </optional> + + <optional> + <ref name="cputune"/> + </optional> + + <optional> + <ref name="numatune"/> + </optional> + </interleave> + </define> + + <!-- The Blkio cgroup related tunables would go in the blkiotune --> + <define name="blkiotune"> + <element name="blkiotune"> + <interleave> + <!-- I/O weight the VM can use --> + <optional> + <element name="weight"> + <ref name="weight"/> + </element> + </optional> + <zeroOrMore> + <element name="device"> + <interleave> + <element name="path"> + <ref name="absFilePath"/> + </element> + <element name="weight"> + <ref name="weight"/> + </element> + </interleave> + </element> + </zeroOrMore> + </interleave> + </element> + </define> + + <!-- All the memory/swap related tunables would go in the memtune --> + <define name="memtune"> + <element name="memtune"> + <!-- Maximum memory the VM can use --> + <optional> + <element name="hard_limit"> + <ref name='scaledInteger'/> + </element> + </optional> + <!-- Minimum memory ascertained for the VM during contention --> + <optional> + <element name="soft_limit"> + <ref name='scaledInteger'/> + </element> + </optional> + <!-- Minimum amount of memory required to start the VM --> + <optional> + <element name="min_guarantee"> + <ref name='scaledInteger'/> + </element> + </optional> + <!-- Maximum swap area the VM can use --> + <optional> + <element name="swap_hard_limit"> + <ref name='scaledInteger'/> + </element> + </optional> + </element> + </define> + + <!-- 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> + </element> + </define> - <!-- All the NUMA related tunables would go in the numatune --> + <!-- All the NUMA related tunables would go in the numatune --> + <define name="numatune"> + <element name="numatune"> <optional> - <element name="numatune"> + <element name="memory"> <optional> - <element name="memory"> + <attribute name="mode"> + <choice> + <value>strict</value> + <value>preferred</value> + <value>interleave</value> + </choice> + </attribute> + </optional> + <choice> + <group> <optional> - <attribute name="mode"> - <choice> - <value>strict</value> - <value>preferred</value> - <value>interleave</value> - </choice> + <attribute name='placement'> + <value>static</value> </attribute> </optional> - <choice> - <group> - <optional> - <attribute name='placement'> - <value>static</value> - </attribute> - </optional> - <optional> - <attribute name='nodeset'> - <ref name='cpuset'/> - </attribute> - </optional> - </group> - <attribute name='placement'> - <value>auto</value> + <optional> + <attribute name='nodeset'> + <ref name='cpuset'/> </attribute> + </optional> + </group> + <attribute name='placement'> + <value>auto</value> + </attribute> </choice> - </element> - </optional> </element> </optional> - </interleave> + </element> </define> + <define name="clock"> <optional> <element name="clock"> -- 1.8.1.4 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list