aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOsier Yang <jyang@redhat.com>2012-03-08 21:36:26 +0800
committerOsier Yang <jyang@redhat.com>2012-03-15 12:24:56 +0800
commit0f8e7ae33ace269af3b4e781d1e1248046be1979 (patch)
tree25eafb0963bec2520e6855c5da8a92f125e524f1 /docs/formatdomain.html.in
parentqemu: Use scsi-block for lun passthrough instead of scsi-disk (diff)
downloadlibvirt-0f8e7ae33ace269af3b4e781d1e1248046be1979.tar.gz
libvirt-0f8e7ae33ace269af3b4e781d1e1248046be1979.tar.bz2
libvirt-0f8e7ae33ace269af3b4e781d1e1248046be1979.zip
qemu: Support numad
numad is an user-level daemon that monitors NUMA topology and processes resource consumption to facilitate good NUMA resource alignment of applications/virtual machines to improve performance and minimize cost of remote memory latencies. It provides a pre-placement advisory interface, so significant processes can be pre-bound to nodes with sufficient available resources. More details: http://fedoraproject.org/wiki/Features/numad "numad -w ncpus:memory_amount" is the advisory interface numad provides currently. This patch add the support by introducing a new XML attribute for <vcpu>. e.g. <vcpu placement="auto">4</vcpu> <vcpu placement="static" cpuset="1-10^6">4</vcpu> The returned advisory nodeset from numad will be printed in domain's dumped XML. e.g. <vcpu placement="auto" cpuset="1-10^6">4</vcpu> If placement is "auto", the number of vcpus and the current memory amount specified in domain XML will be used for numad command line (numad uses MB for memory amount): numad -w $num_of_vcpus:$current_memory_amount / 1024 The advisory nodeset returned from numad will be used to set domain process CPU affinity then. (e.g. qemuProcessInitCpuAffinity). If the user specifies both CPU affinity policy (e.g. (<vcpu cpuset="1-10,^7,^8">4</vcpu>) and placement == "auto" the specified CPU affinity will be overridden. Only QEMU/KVM drivers support it now. See docs update in patch for more details.
Diffstat (limited to 'docs/formatdomain.html.in')
-rw-r--r--docs/formatdomain.html.in17
1 files changed, 14 insertions, 3 deletions
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index bf0675e65..624c6b2cd 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -318,7 +318,7 @@
<pre>
&lt;domain&gt;
...
- &lt;vcpu cpuset="1-4,^3,6" current="1"&gt;2&lt;/vcpu&gt;
+ &lt;vcpu placement='static' cpuset="1-4,^3,6" current="1"&gt;2&lt;/vcpu&gt;
...
&lt;/domain&gt;
</pre>
@@ -336,7 +336,18 @@
be excluded from a previous range. <span class="since">Since
0.8.5</span>, the optional attribute <code>current</code> can
be used to specify whether fewer than the maximum number of
- virtual CPUs should be enabled.
+ virtual CPUs should be enabled. <span class="since">Since
+ 0.9.11 (QEMU and KVM only), the optional attribute
+ <code>placement</code> can be used to indicate the CPU placement
+ mode for domain process, its value can be either "static" or
+ "auto", defaults to "static" if <code>cpuset</code> is specified,
+ "auto" indicates the domain process will be pinned to the advisory
+ nodeset from querying numad, and the value of attribute
+ <code>cpuset</code> will be overridden by the advisory nodeset
+ from numad if it's specified. If both <code>cpuset</code> and
+ <code>placement</code> are not specified, or if <code>placement</code>
+ is "static", but no <code>cpuset</code> is specified, the domain
+ process will be pinned to all the available physical CPUs.
</dd>
</dl>
@@ -544,7 +555,7 @@
<span class='since'>Since 0.9.3</span>
<dt><code>memory</code></dt>
<dd>
- The optional <code>memory</code> element specify how to allocate memory
+ The optional <code>memory</code> element specifies how to allocate memory
for the domain process on a NUMA host. It contains two attributes,
attribute <code>mode</code> is either 'interleave', 'strict',
or 'preferred',