]> git.baikalelectronics.ru Git - kernel.git/commit
sched/core: Provide a scheduling point for RT locks
authorThomas Gleixner <tglx@linutronix.de>
Sun, 15 Aug 2021 21:27:48 +0000 (23:27 +0200)
committerIngo Molnar <mingo@kernel.org>
Tue, 17 Aug 2021 14:57:17 +0000 (16:57 +0200)
commita682149f9c9f3af2764abaac5c2b6d2acbb1547d
treed736ebbfdcb39a025c712273067677deead69dfb
parent40b43958ad7368afabdc0ed160600947a3605eed
sched/core: Provide a scheduling point for RT locks

RT enabled kernels substitute spin/rwlocks with 'sleeping' variants based
on rtmutexes. Blocking on such a lock is similar to preemption versus:

 - I/O scheduling and worker handling, because these functions might block
   on another substituted lock, or come from a lock contention within these
   functions.

 - RCU considers this like a preemption, because the task might be in a read
   side critical section.

Add a separate scheduling point for this, and hand a new scheduling mode
argument to __schedule() which allows, along with separate mode masks, to
handle this gracefully from within the scheduler, without proliferating that
to other subsystems like RCU.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20210815211302.372319055@linutronix.de
include/linux/sched.h
kernel/sched/core.c