sched: Clean up scheduler_ipi()
authorPeter Zijlstra (Intel) <peterz@infradead.org>
Fri, 27 Mar 2020 10:44:56 +0000 (11:44 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 12 May 2020 15:10:48 +0000 (17:10 +0200)
commit90b5363acd4739769c3f38c1aff16171bd133e8c
treea735cefbe7aa985a4bb70caf58b2a961a140f45b
parentb1d1779e5ef7a60b192b61fd97201f322e1e9303
sched: Clean up scheduler_ipi()

The scheduler IPI has grown weird and wonderful over the years, time
for spring cleaning.

Move all the non-trivial stuff out of it and into a regular smp function
call IPI. This then reduces the schedule_ipi() to most of it's former NOP
glory and ensures to keep the interrupt vector lean and mean.

Aside of that avoiding the full irq_enter() in the x86 IPI implementation
is incorrect as scheduler_ipi() can be instrumented. To work around that
scheduler_ipi() had an irq_enter/exit() hack when heavy work was
pending. This is gone now.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Alexandre Chartre <alexandre.chartre@oracle.com>
Link: https://lkml.kernel.org/r/20200505134058.361859938@linutronix.de
kernel/sched/core.c
kernel/sched/fair.c
kernel/sched/sched.h