Skip to content

Commit a50a3f4

Browse files
KAGA-KOKOIngo Molnar
authored andcommitted
sched/rt, Kconfig: Introduce CONFIG_PREEMPT_RT
Add a new entry to the preemption menu which enables the real-time support for the kernel. The choice is only enabled when an architecture supports it. It selects PREEMPT as the RT features depend on it. To achieve that the existing PREEMPT choice is renamed to PREEMPT_LL which select PREEMPT as well. No functional change. Signed-off-by: Thomas Gleixner <[email protected]> Acked-by: Paul E. McKenney <[email protected]> Acked-by: Steven Rostedt (VMware) <[email protected]> Acked-by: Clark Williams <[email protected]> Acked-by: Daniel Bristot de Oliveira <[email protected]> Acked-by: Frederic Weisbecker <[email protected]> Acked-by: Peter Zijlstra (Intel) <[email protected]> Acked-by: Marc Zyngier <[email protected]> Acked-by: Daniel Wagner <[email protected]> Acked-by: Luis Claudio R. Goncalves <[email protected]> Acked-by: Julia Cartwright <[email protected]> Acked-by: Tom Zanussi <[email protected]> Acked-by: Gratian Crisan <[email protected]> Acked-by: Sebastian Siewior <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Lukas Bulwahn <[email protected]> Cc: Mike Galbraith <[email protected]> Cc: Tejun Heo <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
1 parent e3d8548 commit a50a3f4

File tree

2 files changed

+26
-2
lines changed

2 files changed

+26
-2
lines changed

arch/Kconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -801,6 +801,9 @@ config ARCH_NO_COHERENT_DMA_MMAP
801801
config ARCH_NO_PREEMPT
802802
bool
803803

804+
config ARCH_SUPPORTS_RT
805+
bool
806+
804807
config CPU_NO_EFFICIENT_FFS
805808
def_bool n
806809

kernel/Kconfig.preempt

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ config PREEMPT_VOLUNTARY
3535

3636
Select this if you are building a kernel for a desktop system.
3737

38-
config PREEMPT
38+
config PREEMPT_LL
3939
bool "Preemptible Kernel (Low-Latency Desktop)"
4040
depends on !ARCH_NO_PREEMPT
41-
select PREEMPT_COUNT
41+
select PREEMPT
4242
select UNINLINE_SPIN_UNLOCK if !ARCH_INLINE_SPIN_UNLOCK
4343
help
4444
This option reduces the latency of the kernel by making
@@ -55,7 +55,28 @@ config PREEMPT
5555
embedded system with latency requirements in the milliseconds
5656
range.
5757

58+
config PREEMPT_RT
59+
bool "Fully Preemptible Kernel (Real-Time)"
60+
depends on EXPERT && ARCH_SUPPORTS_RT
61+
select PREEMPT
62+
help
63+
This option turns the kernel into a real-time kernel by replacing
64+
various locking primitives (spinlocks, rwlocks, etc.) with
65+
preemptible priority-inheritance aware variants, enforcing
66+
interrupt threading and introducing mechanisms to break up long
67+
non-preemptible sections. This makes the kernel, except for very
68+
low level and critical code pathes (entry code, scheduler, low
69+
level interrupt handling) fully preemptible and brings most
70+
execution contexts under scheduler control.
71+
72+
Select this if you are building a kernel for systems which
73+
require real-time guarantees.
74+
5875
endchoice
5976

6077
config PREEMPT_COUNT
6178
bool
79+
80+
config PREEMPT
81+
bool
82+
select PREEMPT_COUNT

0 commit comments

Comments
 (0)