]> xenbits.xensource.com Git - libvirt.git/commit
qemu: Support numad
authorOsier Yang <jyang@redhat.com>
Thu, 8 Mar 2012 13:36:26 +0000 (21:36 +0800)
committerOsier Yang <jyang@redhat.com>
Thu, 15 Mar 2012 04:24:56 +0000 (12:24 +0800)
commit0f8e7ae33ace269af3b4e781d1e1248046be1979
tree25eafb0963bec2520e6855c5da8a92f125e524f1
parent3165602a554163baff80c835aeadb3a6400d2d33
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.
28 files changed:
configure.ac
docs/formatdomain.html.in
docs/schemas/domaincommon.rng
src/conf/domain_conf.c
src/conf/domain_conf.h
src/libvirt_private.syms
src/qemu/qemu_process.c
tests/domainsnapshotxml2xmlout/disk_snapshot.xml
tests/domainsnapshotxml2xmlout/full_domain.xml
tests/domainsnapshotxml2xmlout/metadata.xml
tests/qemuxml2argvdata/qemuxml2argv-channel-guestfwd.xml
tests/qemuxml2argvdata/qemuxml2argv-channel-spicevmc-old.xml
tests/qemuxml2argvdata/qemuxml2argv-channel-spicevmc.xml
tests/qemuxml2argvdata/qemuxml2argv-channel-virtio-auto.xml
tests/qemuxml2argvdata/qemuxml2argv-channel-virtio.xml
tests/qemuxml2argvdata/qemuxml2argv-console-virtio-many.xml
tests/qemuxml2argvdata/qemuxml2argv-console-virtio.xml
tests/qemuxml2argvdata/qemuxml2argv-metadata.xml
tests/qemuxml2argvdata/qemuxml2argv-minimal.xml
tests/qemuxml2argvdata/qemuxml2argv-seclabel-dynamic-baselabel.xml
tests/qemuxml2argvdata/qemuxml2argv-seclabel-dynamic-override.xml
tests/qemuxml2argvdata/qemuxml2argv-seclabel-dynamic.xml
tests/qemuxml2argvdata/qemuxml2argv-seclabel-none.xml
tests/qemuxml2argvdata/qemuxml2argv-seclabel-static-relabel.xml
tests/qemuxml2argvdata/qemuxml2argv-seclabel-static.xml
tests/qemuxml2xmloutdata/qemuxml2xmlout-channel-virtio-auto.xml
tests/qemuxml2xmloutdata/qemuxml2xmlout-console-virtio.xml
tests/qemuxml2xmloutdata/qemuxml2xmlout-metadata.xml