]> git.baikalelectronics.ru Git - kernel.git/commit
sched/core: Fix rules for running on online && !active CPUs
authorPeter Zijlstra <peterz@infradead.org>
Tue, 25 Jul 2017 16:58:21 +0000 (18:58 +0200)
committerIngo Molnar <mingo@kernel.org>
Thu, 31 May 2018 10:24:24 +0000 (12:24 +0200)
commite2dfa8d1f38b26b4799e1df080c55c85c537f49a
treebbdd1a283a4fb22431e3be75169a7cf4599f0aee
parent381a253836ab2ce5ef830bc5cc006e36fbe195e6
sched/core: Fix rules for running on online && !active CPUs

As already enforced by the WARN() in __set_cpus_allowed_ptr(), the rules
for running on an online && !active CPU are stricter than just being a
kthread, you need to be a per-cpu kthread.

If you're not strictly per-CPU, you have better CPUs to run on and
don't need the partially booted one to get your work done.

The exception is to allow smpboot threads to bootstrap the CPU itself
and get kernel 'services' initialized before we allow userspace on it.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Tejun Heo <tj@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Fixes: 04f1d3f915ca ("sched: Allow migrating kthreads into online but inactive CPUs")
Link: http://lkml.kernel.org/r/20170725165821.cejhb7v2s3kecems@hirez.programming.kicks-ass.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/sched/core.c