提交 8ef2b2c5 编写于 作者: D Daniel P. Berrange

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: NDaniel P. Berrange <berrange@redhat.com>
上级 8ad126e6
......@@ -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">
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册