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

[libvirt] [PATCH 1/4] numatune: Define XML schema and add docs



Example of numatune XML:

  <numatune>
    <memory model="interleave" nodeset="+0-4,8-12"/>
  </numatune>
---
 docs/formatdomain.html.in |   14 ++++++++++++++
 docs/schemas/domain.rng   |   25 +++++++++++++++++++++++++
 2 files changed, 39 insertions(+), 0 deletions(-)

diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index dcfcd94..f6ab621 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -288,6 +288,9 @@
     &lt;min_guarantee&gt;65536&lt;/min_guarantee&gt;
   &lt;/memtune&gt;
   &lt;vcpu cpuset="1-4,^3,6" current="1"&gt;2&lt;/vcpu&gt;
+  &lt;numatune&gt;
+  &lt;memory model="strict" nodeset="1,2,!3-6"&gt;
+  &lt;/numatune&gt;
   ...</pre>
 
     <dl>
@@ -366,6 +369,17 @@
         the OS provided defaults. NB, There is no unit for the value, it's a relative
         measure based on the setting of other VM, e.g. A VM configured with value
         2048 will get twice as much CPU time as a VM configured with value 1024.</dd>
+      <dt><code>numatune</code></dt>
+      <dd> The optional <code>numatune</code> element provides details of
+        how to tune the performance of a NUMA host via controlling NUMA policy for
+        domain process. NB, only supported by QEMU driver.
+      <dt><code>memory</code></dt>
+      <dd> The optional <code>memory</code> element specify how to allocate memory
+        for the domain process on a NUMA host. It contains two attributes,
+        attribute <code>model</code> is either 'interleave', 'strict', or 'preferred'.
+        attribute <code>nodeset</code> specifies the NUMA nodes, it can be specified as
+        25 or 12-15 or 1,3,5-7 or +6-10 or 1-7,!3-5 or !+6-10. NB, if <code>model</code>
+        is "preferred", <code>nodeset</code> only accepts single node.</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 7163c6e..7e7765d 100644
--- a/docs/schemas/domain.rng
+++ b/docs/schemas/domain.rng
@@ -387,6 +387,26 @@
           </zeroOrMore>
         </element>
       </optional>
+
+      <!-- All the NUMA related tunables would go in the numatune -->
+      <optional>
+        <element name="numatune">
+          <optional>
+            <element name="memory">
+              <attribute name="model">
+                <choice>
+                  <value>interleave</value>
+                  <value>strict</value>
+                  <value>preferred</value>
+                </choice>
+              </attribute>
+              <attribute name="nodeset">
+                <ref name="nodeset"/>
+              </attribute>
+            </element>
+          </optional>
+        </element>
+      </optional>
     </interleave>
   </define>
   <define name="clock">
@@ -2265,6 +2285,11 @@
       <param name="pattern">([0-9]+(-[0-9]+)?|\^[0-9]+)(,([0-9]+(-[0-9]+)?|\^[0-9]+))*</param>
     </data>
   </define>
+  <define name="nodeset">
+    <data type="string">
+      <param name="pattern">([!\+]?[0-9]+(-[0-9]+)?)(,([!\+]?[0-9]+(-[0-9]+)?))*</param>
+    </data>
+  </define>
   <define name="countCPU">
     <data type="unsignedShort">
       <param name="pattern">[0-9]+</param>
-- 
1.7.4


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