summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2019-07-17 16:01:49 -0400
committerIngo Molnar <mingo@kernel.org>2019-07-18 17:10:57 -0400
commita50a3f4b6a313dc76912bd4ad3b8b4f4b479c801 (patch)
treeeba3691bf7408ec1dd6840486a5612e07e3bcbd8
parente3d85487fba42206024bc3ed32e4b581c7cb46db (diff)
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 <tglx@linutronix.de> Acked-by: Paul E. McKenney <paulmck@linux.ibm.com> Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Acked-by: Clark Williams <williams@redhat.com> Acked-by: Daniel Bristot de Oliveira <bristot@redhat.com> Acked-by: Frederic Weisbecker <frederic@kernel.org> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Marc Zyngier <marc.zyngier@arm.com> Acked-by: Daniel Wagner <wagi@monom.org> Acked-by: Luis Claudio R. Goncalves <lgoncalv@redhat.com> Acked-by: Julia Cartwright <julia@ni.com> Acked-by: Tom Zanussi <tom.zanussi@linux.intel.com> Acked-by: Gratian Crisan <gratian.crisan@ni.com> Acked-by: Sebastian Siewior <bigeasy@linutronix.de> Cc: Andrew Morton <akpm@linuxfoundation.org> Cc: Christoph Hellwig <hch@lst.de> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Lukas Bulwahn <lukas.bulwahn@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Tejun Heo <tj@kernel.org> Link: http://lkml.kernel.org/r/alpine.DEB.2.21.1907172200190.1778@nanos.tec.linutronix.de Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r--arch/Kconfig3
-rw-r--r--kernel/Kconfig.preempt25
2 files changed, 26 insertions, 2 deletions
diff --git a/arch/Kconfig b/arch/Kconfig
index c47b328eada0..ada51f36bd5d 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -801,6 +801,9 @@ config ARCH_NO_COHERENT_DMA_MMAP
801config ARCH_NO_PREEMPT 801config ARCH_NO_PREEMPT
802 bool 802 bool
803 803
804config ARCH_SUPPORTS_RT
805 bool
806
804config CPU_NO_EFFICIENT_FFS 807config CPU_NO_EFFICIENT_FFS
805 def_bool n 808 def_bool n
806 809
diff --git a/kernel/Kconfig.preempt b/kernel/Kconfig.preempt
index dc0b682ec2d9..fc020c09b7e8 100644
--- a/kernel/Kconfig.preempt
+++ b/kernel/Kconfig.preempt
@@ -35,10 +35,10 @@ config PREEMPT_VOLUNTARY
35 35
36 Select this if you are building a kernel for a desktop system. 36 Select this if you are building a kernel for a desktop system.
37 37
38config PREEMPT 38config PREEMPT_LL
39 bool "Preemptible Kernel (Low-Latency Desktop)" 39 bool "Preemptible Kernel (Low-Latency Desktop)"
40 depends on !ARCH_NO_PREEMPT 40 depends on !ARCH_NO_PREEMPT
41 select PREEMPT_COUNT 41 select PREEMPT
42 select UNINLINE_SPIN_UNLOCK if !ARCH_INLINE_SPIN_UNLOCK 42 select UNINLINE_SPIN_UNLOCK if !ARCH_INLINE_SPIN_UNLOCK
43 help 43 help
44 This option reduces the latency of the kernel by making 44 This option reduces the latency of the kernel by making
@@ -55,7 +55,28 @@ config PREEMPT
55 embedded system with latency requirements in the milliseconds 55 embedded system with latency requirements in the milliseconds
56 range. 56 range.
57 57
58config 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
58endchoice 75endchoice
59 76
60config PREEMPT_COUNT 77config PREEMPT_COUNT
61 bool 78 bool
79
80config PREEMPT
81 bool
82 select PREEMPT_COUNT