aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common/schedule.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/schedule.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/schedule.c')
-rw-r--r--xen/common/schedule.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/xen/common/schedule.c b/xen/common/schedule.c
index c494017fc5..3505c8b302 100644
--- a/xen/common/schedule.c
+++ b/xen/common/schedule.c
@@ -280,12 +280,13 @@ int sched_move_domain(struct domain *d, struct cpupool *c)
SCHED_OP(VCPU2OP(v), insert_vcpu, v);
}
- domain_update_node_affinity(d);
d->cpupool = c;
SCHED_OP(DOM2OP(d), free_domdata, d->sched_priv);
d->sched_priv = domdata;
+ domain_update_node_affinity(d);
+
domain_unpause(d);
xfree(vcpu_priv);
@@ -535,7 +536,6 @@ int cpu_disable_scheduler(unsigned int cpu)
struct cpupool *c;
cpumask_t online_affinity;
int ret = 0;
- bool_t affinity_broken;
c = per_cpu(cpupool, cpu);
if ( c == NULL )
@@ -543,8 +543,6 @@ int cpu_disable_scheduler(unsigned int cpu)
for_each_domain_in_cpupool ( d, c )
{
- affinity_broken = 0;
-
for_each_vcpu ( d, v )
{
vcpu_schedule_lock_irq(v);
@@ -556,7 +554,6 @@ int cpu_disable_scheduler(unsigned int cpu)
printk("Breaking vcpu affinity for domain %d vcpu %d\n",
v->domain->domain_id, v->vcpu_id);
cpumask_setall(v->cpu_affinity);
- affinity_broken = 1;
}
if ( v->processor == cpu )
@@ -580,8 +577,7 @@ int cpu_disable_scheduler(unsigned int cpu)
ret = -EAGAIN;
}
- if ( affinity_broken )
- domain_update_node_affinity(d);
+ domain_update_node_affinity(d);
}
return ret;