All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xen: Always ask the scheduler to re-place the vcpu when the affinity changes
@ 2013-03-04 12:19 George Dunlap
  2013-03-04 12:35 ` Jan Beulich
  0 siblings, 1 reply; 8+ messages in thread
From: George Dunlap @ 2013-03-04 12:19 UTC (permalink / raw)
  To: xen-devel; +Cc: George Dunlap, Keir Fraser, Jan Beulich

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.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
---
 xen/common/schedule.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/xen/common/schedule.c b/xen/common/schedule.c
index de11110..dbef5af 100644
--- a/xen/common/schedule.c
+++ b/xen/common/schedule.c
@@ -613,9 +613,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);
 
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-03-04 14:58 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-04 12:19 [PATCH] xen: Always ask the scheduler to re-place the vcpu when the affinity changes George Dunlap
2013-03-04 12:35 ` Jan Beulich
2013-03-04 13:45   ` George Dunlap
2013-03-04 14:03     ` George Dunlap
2013-03-04 14:23       ` Keir Fraser
2013-03-04 14:22         ` George Dunlap
2013-03-04 14:58           ` Jan Beulich
2013-03-04 14:21     ` Keir Fraser

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.