aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common/cpupool.c
diff options
context:
space:
mode:
authorJuergen Gross <juergen.gross@ts.fujitsu.com>2012-01-24 14:21:12 +0000
committerJuergen Gross <juergen.gross@ts.fujitsu.com>2012-01-24 14:21:12 +0000
commitb3b15b7611b00f96b08fd69d9e092da535855055 (patch)
tree6b33a37f15013c6f2a55a159abf8989177b1262d /xen/common/cpupool.c
parent79cf2c4c4f78e970e5e62b2d246b22cd4d1dc442 (diff)
downloadxen-b3b15b7611b00f96b08fd69d9e092da535855055.tar.gz
xen-b3b15b7611b00f96b08fd69d9e092da535855055.tar.bz2
xen-b3b15b7611b00f96b08fd69d9e092da535855055.zip
reflect cpupool in numa node affinity
In order to prefer node local memory for a domain the numa node locality info must be built according to the cpus belonging to the cpupool of the domain. Signed-off-by: juergen.gross@ts.fujitsu.com Committed-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/common/cpupool.c')
-rw-r--r--xen/common/cpupool.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/xen/common/cpupool.c b/xen/common/cpupool.c
index 45162ad708..6cef4a003e 100644
--- a/xen/common/cpupool.c
+++ b/xen/common/cpupool.c
@@ -220,6 +220,7 @@ static int cpupool_assign_cpu_locked(struct cpupool *c, unsigned int cpu)
{
int ret;
struct cpupool *old;
+ struct domain *d;
if ( (cpupool_moving_cpu == cpu) && (c != cpupool_cpu_moving) )
return -EBUSY;
@@ -240,6 +241,14 @@ static int cpupool_assign_cpu_locked(struct cpupool *c, unsigned int cpu)
cpupool_cpu_moving = NULL;
}
cpumask_set_cpu(cpu, c->cpu_valid);
+
+ rcu_read_lock(&domlist_read_lock);
+ for_each_domain_in_cpupool(d, c)
+ {
+ domain_update_node_affinity(d);
+ }
+ rcu_read_unlock(&domlist_read_lock);
+
return 0;
}