OSDN Git Service

sched: Make migrate_disable/enable() independent of RT
authorThomas Gleixner <tglx@linutronix.de>
Wed, 18 Nov 2020 19:48:42 +0000 (20:48 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 24 Nov 2020 10:25:44 +0000 (11:25 +0100)
commit74d862b682f51e45d25b95b1ecf212428a4967b0
tree69c1c8a1105267cd8afc5a1c1b1ff019bcf9e37e
parentfa50e2b452c60cff9f4000de5b372a61d6695c26
sched: Make migrate_disable/enable() independent of RT

Now that the scheduler can deal with migrate disable properly, there is no
real compelling reason to make it only available for RT.

There are quite some code pathes which needlessly disable preemption in
order to prevent migration and some constructs like kmap_atomic() enforce
it implicitly.

Making it available independent of RT allows to provide a preemptible
variant of kmap_atomic() and makes the code more consistent in general.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Grudgingly-Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20201118204007.269943012@linutronix.de
include/linux/kernel.h
include/linux/preempt.h
include/linux/sched.h
kernel/sched/core.c
kernel/sched/sched.h
lib/smp_processor_id.c