Commit 4939602a2441306008c6dca38216b741d4e09a42
Committed by
Ingo Molnar
1 parent
fa17b507f1
sched: Unify the ->cpus_allowed mask copy
Currently every sched_class::set_cpus_allowed() implementation has to copy the cpumask into task_struct::cpus_allowed, this is pointless, put this copy in the generic code. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Acked-by: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/n/tip-jhl5s9fckd9ptw1fzbqqlrd3@git.kernel.org Signed-off-by: Ingo Molnar <mingo@elte.hu>
Showing 2 changed files with 3 additions and 7 deletions Side-by-side Diff
kernel/sched.c
... | ... | @@ -6161,10 +6161,9 @@ |
6161 | 6161 | { |
6162 | 6162 | if (p->sched_class && p->sched_class->set_cpus_allowed) |
6163 | 6163 | p->sched_class->set_cpus_allowed(p, new_mask); |
6164 | - else { | |
6165 | - cpumask_copy(&p->cpus_allowed, new_mask); | |
6166 | - p->rt.nr_cpus_allowed = cpumask_weight(new_mask); | |
6167 | - } | |
6164 | + | |
6165 | + cpumask_copy(&p->cpus_allowed, new_mask); | |
6166 | + p->rt.nr_cpus_allowed = cpumask_weight(new_mask); | |
6168 | 6167 | } |
6169 | 6168 | |
6170 | 6169 | /* |
kernel/sched_rt.c