sched: Simplify wake_up_*idle*()
authorPeter Zijlstra <peterz@infradead.org>
Tue, 21 Sep 2021 20:16:02 +0000 (22:16 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Thu, 7 Oct 2021 11:51:15 +0000 (13:51 +0200)
commit8850cb663b5cda04d33f9cfbc38889d73d3c8e24
treeb928705d29ba099d985c9d2090a66ca1d28ed052
parent00619f7c650e4e46c650cb2e2fd5f438b32dc64b
sched: Simplify wake_up_*idle*()

Simplify and make wake_up_if_idle() more robust, also don't iterate
the whole machine with preempt_disable() in it's caller:
wake_up_all_idle_cpus().

This prepares for another wake_up_if_idle() user that needs a full
do_idle() cycle.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Vasily Gorbik <gor@linux.ibm.com>
Tested-by: Vasily Gorbik <gor@linux.ibm.com> # on s390
Link: https://lkml.kernel.org/r/20210929152428.769328779@infradead.org
kernel/sched/core.c
kernel/smp.c