summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2011-09-27 08:40:24 -0400
committerClark Williams <williams@redhat.com>2012-04-13 11:01:37 -0500
commitff62eb8c393ad4184e7f7cda3bc4fe54f076f80c (patch)
tree17c9c49ca4cc21a5aa6d6d3c9d1d85b821567161 /kernel
parentcb1ff70419608de315ffcdbe908ded599e57863c (diff)
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')
-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 9e2fcf24bec4..380db9e7f0eb 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -3164,16 +3164,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->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)