diff options
author | Dario Faggioli <dario.faggioli@citrix.com> | 2012-07-26 15:41:54 +0100 |
---|---|---|
committer | Dario Faggioli <dario.faggioli@citrix.com> | 2012-07-26 15:41:54 +0100 |
commit | e98fee8390936477d369b9832ff9bb06594510c7 (patch) | |
tree | 485737b4c7bd3a9933296f3f52e6593f7b4f7570 /tools/libxl/libxl_types.idl | |
parent | 47ce0e3550a2d1ce8407e3643ceb595657ac4d79 (diff) | |
download | xen-e98fee8390936477d369b9832ff9bb06594510c7.tar.gz xen-e98fee8390936477d369b9832ff9bb06594510c7.tar.bz2 xen-e98fee8390936477d369b9832ff9bb06594510c7.zip |
libxl: enable automatic placement of guests on NUMA nodes
If a domain does not have a VCPU affinity, try to pin it automatically
to some PCPUs. This is done taking into account the NUMA characteristics
of the host. In fact, we look for a combination of host's NUMA nodes
with enough free memory and number of PCPUs for the new domain, and pin
it to the VCPUs of those nodes.
Deciding which placement is the best happens by means of some heuristics.
For instance, smaller candidates are better, both from a domain perspective
(less memory spreading among nodes) and from the entire system perspective
(smaller memory fragmentation). In case of candidates of equal sizes
(i.e., with the same number of nodes), the amount of free memory and
the number of domains' vCPUs already pinned to the candidates' nodes are
both considered. Very often, candidates with greater amount of memory
are the one we wants, as this is good for keeping memory fragmentation
under control. However, we do not want to overcommit some node too much,
just because it has a lot of memory, and that's why the number of vCPUs
must be accounted for.
This all happens internally to libxl, and no API for driving the
mechanism is provided for now. This matches what xend already does.
Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Tested-by: Andre Przywara <andre.przywara@amd.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'tools/libxl/libxl_types.idl')
-rw-r--r-- | tools/libxl/libxl_types.idl | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl index 574d8d2f6d..c1815c6c00 100644 --- a/tools/libxl/libxl_types.idl +++ b/tools/libxl/libxl_types.idl @@ -249,6 +249,7 @@ libxl_domain_build_info = Struct("domain_build_info",[ ("max_vcpus", integer), ("avail_vcpus", libxl_bitmap), ("cpumap", libxl_bitmap), + ("numa_placement", libxl_defbool), ("tsc_mode", libxl_tsc_mode), ("max_memkb", MemKB), ("target_memkb", MemKB), |