[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH 6/6] cputune: Add docs xml schema for cputune xml



* docs/schemas/domain.rng (New definition for cputune xml)
* docs/formatdomain.html.in (Docs for cputune xml)
---
 docs/formatdomain.html.in |   21 +++++++++++++++++++++
 docs/schemas/domain.rng   |   32 ++++++++++++++++++++++++++++++++
 2 files changed, 53 insertions(+), 0 deletions(-)

diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 84b1cab..7f8493b 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -288,6 +288,13 @@
     <min_guarantee>65536</min_guarantee>
   </memtune>
   <vcpu cpuset="1-4,^3,6" current="1">2</vcpu>
+  <cputune>
+    <vcpupin vcpu="0" cpuset="1-4,^2">
+    <vcpupin vcpu="1" cpuset="0,1">
+    <vcpupin vcpu="2" cpuset="2,3">
+    <vcpupin vcpu="3" cpuset="0,4">
+    <cpushares>2048</cpushares>
+  </cputune>
   ...</pre>
 
     <dl>
@@ -345,6 +352,20 @@
         be used to specify whether fewer than the maximum number of
         virtual CPUs should be enabled.
       </dd>
+      <dt><code>cputune</code></dt>
+      <dd> The optional <code>cputune</code> element provides details
+        regarding the cpu tunable parameters for the domain.</dd>
+      <dt><code>vcpupin</code></dt>
+      <dd> The optional <code>vcpupin</code> specifies which of host physical
+        CPUS the domain VCPU will be pinned to. If this is ommited, each VCPU
+        pinned to all the physical CPUS by default. It contains two required
+        attributes, the attribute <code>vcpu</vcpu> specifies vcpu id, and the
+        attribute <code>cpuset</code> is same as attribute <code>cpuset</code>
+        of element <code>vcpu</code>. NB, Only qemu driver supports</dd>
+      <dt><code>cpushares</code></dt>
+      <dd> The optional <code>cpushares</code> specifies the proportional
+        weighted share for the domain. If this is ommited, it defaults
+        to the OS provided defaults.</dd>
     </dl>
 
     <h3><a name="elementsCPU">CPU model and topology</a></h3>
diff --git a/docs/schemas/domain.rng b/docs/schemas/domain.rng
index 8b215f3..e4430d0 100644
--- a/docs/schemas/domain.rng
+++ b/docs/schemas/domain.rng
@@ -363,6 +363,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">
@@ -2193,6 +2214,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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]