mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
Refactor RNG schema for resource tuning
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@redhat.com>
This commit is contained in:
parent
8ad126e695
commit
8ef2b2c5b1
@ -498,62 +498,6 @@
|
|||||||
</element>
|
</element>
|
||||||
</optional>
|
</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>
|
<optional>
|
||||||
<element name="vcpu">
|
<element name="vcpu">
|
||||||
<optional>
|
<optional>
|
||||||
@ -578,91 +522,164 @@
|
|||||||
</element>
|
</element>
|
||||||
</optional>
|
</optional>
|
||||||
|
|
||||||
<!-- All the cpu related tunables would go in the cputune -->
|
|
||||||
<optional>
|
<optional>
|
||||||
<element name="cputune">
|
<ref name="blkiotune"/>
|
||||||
<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>
|
|
||||||
</optional>
|
</optional>
|
||||||
|
|
||||||
<!-- All the NUMA related tunables would go in the numatune -->
|
|
||||||
<optional>
|
<optional>
|
||||||
<element name="numatune">
|
<ref name="memtune"/>
|
||||||
<optional>
|
</optional>
|
||||||
<element name="memory">
|
|
||||||
<optional>
|
<optional>
|
||||||
<attribute name="mode">
|
<ref name="cputune"/>
|
||||||
<choice>
|
</optional>
|
||||||
<value>strict</value>
|
|
||||||
<value>preferred</value>
|
<optional>
|
||||||
<value>interleave</value>
|
<ref name="numatune"/>
|
||||||
</choice>
|
|
||||||
</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>
|
|
||||||
</attribute>
|
|
||||||
</choice>
|
|
||||||
</element>
|
|
||||||
</optional>
|
|
||||||
</element>
|
|
||||||
</optional>
|
</optional>
|
||||||
</interleave>
|
</interleave>
|
||||||
</define>
|
</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 -->
|
||||||
|
<define name="numatune">
|
||||||
|
<element name="numatune">
|
||||||
|
<optional>
|
||||||
|
<element name="memory">
|
||||||
|
<optional>
|
||||||
|
<attribute name="mode">
|
||||||
|
<choice>
|
||||||
|
<value>strict</value>
|
||||||
|
<value>preferred</value>
|
||||||
|
<value>interleave</value>
|
||||||
|
</choice>
|
||||||
|
</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>
|
||||||
|
</attribute>
|
||||||
|
</choice>
|
||||||
|
</element>
|
||||||
|
</optional>
|
||||||
|
</element>
|
||||||
|
</define>
|
||||||
|
|
||||||
<define name="clock">
|
<define name="clock">
|
||||||
<optional>
|
<optional>
|
||||||
<element name="clock">
|
<element name="clock">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user