]> xenbits.xensource.com Git - xen.git/commit
derive NUMA node affinity from hard and soft CPU affinity
authorDario Faggioli <dario.faggioli@citrix.com>
Mon, 16 Jun 2014 10:13:03 +0000 (12:13 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 16 Jun 2014 10:13:03 +0000 (12:13 +0200)
commitbf508bd2fb83b51f8547d1969629e05b6b87d1c5
tree779b43fd2a9080bc100a61ab8b14d6fa1798331a
parentdb6b2215910327cd4401868c67a44680932c1f2a
derive NUMA node affinity from hard and soft CPU affinity

if a domain's NUMA node-affinity (which is what controls
memory allocations) is provided by the user/toolstack, it
just is not touched. However, if the user does not say
anything, leaving it all to Xen, let's compute it in the
following way:

 1. cpupool's cpus & hard-affinity & soft-affinity
 2. if (1) is empty: cpupool's cpus & hard-affinity

This guarantees memory to be allocated from the narrowest
possible set of NUMA nodes, ad makes it relatively easy to
set up NUMA-aware scheduling on top of soft affinity.

Note that such 'narrowest set' is guaranteed to be non-empty.

Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/common/domain.c
xen/common/schedule.c