From 2c1931ea1d4afe7d9031f84151fcd1e0a906d5f7 Mon Sep 17 00:00:00 2001 From: Peter Zijlstra Date: Tue, 27 Sep 2011 08:40:24 -0400 Subject: sched: Do not compare cpu masks in scheduler Signed-off-by: Peter Zijlstra Cc: Peter Zijlstra Cc: Clark Williams Link: http://lkml.kernel.org/r/20110927124423.128129033@goodmis.org Signed-off-by: Thomas Gleixner 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) -- cgit v0.10.2