41 lines
1.4 KiB
Diff
41 lines
1.4 KiB
Diff
Subject: sched: Do not compare cpu masks in scheduler
|
|
Date: Tue, 27 Sep 2011 08:40:24 -0400
|
|
From: Peter Zijlstra <a.p.zijlstra@chello.nl>
|
|
|
|
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
|
|
Cc: Peter Zijlstra <peterz@infradead.org>
|
|
Cc: Clark Williams <williams@redhat.com>
|
|
Link: http://lkml.kernel.org/r/20110927124423.128129033@goodmis.org
|
|
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
|
|
|
---
|
|
kernel/sched.c | 14 +++++---------
|
|
1 file changed, 5 insertions(+), 9 deletions(-)
|
|
|
|
Index: linux-3.2/kernel/sched.c
|
|
===================================================================
|
|
--- linux-3.2.orig/kernel/sched.c
|
|
+++ linux-3.2/kernel/sched.c
|
|
@@ -4383,16 +4383,12 @@ static inline void update_migrate_disabl
|
|
*/
|
|
mask = tsk_cpus_allowed(p);
|
|
|
|
- WARN_ON(!cpumask_test_cpu(smp_processor_id(), mask));
|
|
+ if (p->sched_class->set_cpus_allowed)
|
|
+ p->sched_class->set_cpus_allowed(p, mask);
|
|
+ p->rt.nr_cpus_allowed = cpumask_weight(mask);
|
|
|
|
- if (!cpumask_equal(&p->cpus_allowed, mask)) {
|
|
- if (p->sched_class->set_cpus_allowed)
|
|
- p->sched_class->set_cpus_allowed(p, mask);
|
|
- p->rt.nr_cpus_allowed = cpumask_weight(mask);
|
|
-
|
|
- /* Let migrate_enable know to fix things back up */
|
|
- p->migrate_disable |= MIGRATE_DISABLE_SET_AFFIN;
|
|
- }
|
|
+ /* Let migrate_enable know to fix things back up */
|
|
+ p->migrate_disable |= MIGRATE_DISABLE_SET_AFFIN;
|
|
}
|
|
|
|
void migrate_disable(void)
|