aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Dunlap <george.dunlap@eu.citrix.com>2013-03-08 09:43:40 +0100
committerJan Beulich <jbeulich@suse.com>2013-03-08 09:43:40 +0100
commit0f3b02d07e12b76c568ce82d7ec6bf80fdf3870f (patch)
treead05e93d17cc5e0af40146860d45c33486b600dd
parente31d4781c0e04bec01135dea0cb7d634ee035cd3 (diff)
downloadxen-0f3b02d07e12b76c568ce82d7ec6bf80fdf3870f.tar.gz
xen-0f3b02d07e12b76c568ce82d7ec6bf80fdf3870f.tar.bz2
xen-0f3b02d07e12b76c568ce82d7ec6bf80fdf3870f.zip
sched: always ask the scheduler to re-place the vcpu when the affinity changes
It's probably a good idea to re-evaluate placement whenever the affinity changes. This additionally has the benefit of removing scheduler-specific exceptions introduced in git c/s e6a6fd63. The conditionals surrounding vcpu_migrate() are left pending a re-work of the logic to avoid the common case calling vcpu_migrate() twice (once here, and once in context_saved(). Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
-rw-r--r--xen/common/schedule.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/xen/common/schedule.c b/xen/common/schedule.c
index 5f677c36f8..83fae4c9d2 100644
--- a/xen/common/schedule.c
+++ b/xen/common/schedule.c
@@ -614,9 +614,10 @@ int vcpu_set_affinity(struct vcpu *v, const cpumask_t *affinity)
vcpu_schedule_lock_irq(v);
cpumask_copy(v->cpu_affinity, affinity);
- if ( VCPU2OP(v)->sched_id == XEN_SCHEDULER_SEDF ||
- !cpumask_test_cpu(v->processor, v->cpu_affinity) )
- set_bit(_VPF_migrating, &v->pause_flags);
+
+ /* Always ask the scheduler to re-evaluate placement
+ * when changing the affinity */
+ set_bit(_VPF_migrating, &v->pause_flags);
vcpu_schedule_unlock_irq(v);