[libvirt] [PATCH 1/8] cputune: Add xml schema for cputune xml

Osier Yang jyang at redhat.com
Tue Mar 29 06:32:19 UTC 2011


Sample of cputune xml:
  <cputune>
    <shares>2048</shares>
    <vcpupin vcpu='0' cpuset='0-4,^3'/>
    <vcpupin vcpu='1' cpuset='1,2'/>
  </cputune>

* docs/schemas/domain.rng
---
 docs/schemas/domain.rng |   32 ++++++++++++++++++++++++++++++++
 1 files changed, 32 insertions(+), 0 deletions(-)

diff --git a/docs/schemas/domain.rng b/docs/schemas/domain.rng
index 30f673f..1ad043b 100644
--- a/docs/schemas/domain.rng
+++ b/docs/schemas/domain.rng
@@ -366,6 +366,27 @@
           <ref name="countCPU"/>
         </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>
+          <zeroOrMore>
+            <element name="vcpupin">
+              <attribute name="vcpu">
+                <ref name="vcpuid"/>
+              </attribute>
+              <attribute name="cpuset">
+                <ref name="cpuset"/>
+              </attribute>
+            </element>
+          </zeroOrMore>
+        </element>
+      </optional>
     </interleave>
   </define>
   <define name="clock">
@@ -2198,6 +2219,17 @@
       <param name="minInclusive">1</param>
     </data>
   </define>
+  <define name="vcpuid">
+    <data type="unsignedShort">
+      <param name="pattern">[0-9]+</param>
+    </data>
+  </define>
+  <define name="cpushares">
+    <data type="unsignedInt">
+      <param name="pattern">[0-9]+</param>
+      <param name="maxInclusive">262144</param>
+    </data>
+   </define>
   <define name="hostName">
     <data type="string">
       <param name="pattern">[a-zA-Z0-9\.\-]+</param>
--
1.7.4




More information about the libvir-list mailing list