summaryrefslogtreecommitdiff
path: root/kernel/sched
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2011-09-27 12:40:24 (GMT)
committerScott Wood <scottwood@freescale.com>2014-04-10 00:19:18 (GMT)
commit0273ae2dd2669b017c4e11d3840a0b69e8dba2d6 (patch)
treeacf5bc17edebbf4e6190c9a932ea43a00b511294 /kernel/sched
parentbd3332707bb49a7e4d69ce375cb8d9988e543aad (diff)
downloadlinux-fsl-qoriq-0273ae2dd2669b017c4e11d3840a0b69e8dba2d6.tar.xz
sched: Do not compare cpu masks in scheduler
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>
Diffstat (limited to 'kernel/sched')
-rw-r--r--kernel/sched/core.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index fdf5edd..7dde497 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -2392,16 +2392,12 @@ static inline void update_migrate_disable(struct task_struct *p)
*/
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->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->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)