mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-01-13 12:53:27 +00:00
sched: Don't scan all-offline ->cpus_allowed twice if !CONFIG_CPUSETS
If CONFIG_CPUSETS=n then "case cpuset" changes the state and runs the already failed for_each_cpu() loop again for no reason. Signed-off-by: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Rik van Riel <riel@redhat.com> Cc: Tejun Heo <tj@kernel.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Vitaly Kuznetsov <vkuznets@redhat.com> Cc: heiko.carstens@de.ibm.com Link: http://lkml.kernel.org/r/20151010185315.GA24100@redhat.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
parent
62694cd513
commit
e73e85f059
@ -1580,13 +1580,15 @@ static int select_fallback_rq(int cpu, struct task_struct *p)
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* No more Mr. Nice Guy. */
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case cpuset:
|
case cpuset:
|
||||||
/* No more Mr. Nice Guy. */
|
if (IS_ENABLED(CONFIG_CPUSETS)) {
|
||||||
cpuset_cpus_allowed_fallback(p);
|
cpuset_cpus_allowed_fallback(p);
|
||||||
state = possible;
|
state = possible;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
/* fall-through */
|
||||||
case possible:
|
case possible:
|
||||||
do_set_cpus_allowed(p, cpu_possible_mask);
|
do_set_cpus_allowed(p, cpu_possible_mask);
|
||||||
state = fail;
|
state = fail;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user