Kconfig: Introduce CONFIG_PREEMPT_RT
cover Kconfig: Introduce CONFIG_PREEMPT_RT
Linus,
please consider to apply the following patch, which introduces the Kconfig symbol CONFIG_PREEMPT_RT.
Rationale:
The real-time preemption patch set exists for almost 15 years now and while the vast majority of infrastructure and enhancements have found their way into the mainline kernel, the final integration of RT is still missing.
Over the course of the last few years, we have worked on reducing the intrusivenness of the RT patches by refactoring kernel infrastructure to be more real-time friendly. Almost all of these changes were benefitial to the mainline kernel on their own, so there was no objection to integrate them.
Though except for the still ongoing printk refactoring, the remaining changes which are required to make RT a first class mainline citizen are not longer arguable as immediately beneficial for the mainline kernel. Most of them are either reordering code flows or adding RT specific functionality. But this now has hit a wall and turned into a classic hen and egg problem:
Maintainers are rightfully wary vs. these changes as they make only sense if the final integration of RT into the mainline kernel takes place.
Adding CONFIG_PREEMPT_RT aims to solve this as a clear sign that RT will be fully integrated into the mainline kernel. The final integration of the missing bits and pieces will be of course done with the same careful approach as we have used in the past.
While I'm aware that you are not entirely enthusiastic about that, I think that RT should receive the same treatment as any other widely used out of tree functionality, which we have accepted into mainline over the years.
RT has become the de-facto standard real-time enhancement and is shipped by enterprise, embedded and community distros. It's in use throughout a wide range of industries: telecommunications, industrial automation, professional audio, medical devices, data acquisition, automotive - just to name a few major use cases.
RT development is backed by a Linuxfoundation project which is supported by major stakeholders of this technology. The funding will continue over the actual inclusion into mainline to make sure that the functionality is neither introducing regressions, regressing itself, nor becomes subject to bitrot. There is also a lifely user community around RT as well, so contrary to the grim situation 5 years ago, it's a healthy project.
As RT is still a good vehicle to exercise rarely used code paths and to detect hard to trigger issues, you could at least view it as a QA tool if nothing else.
The current state of the RT patches against 5.2 is:
365 files changed, 9396 insertions(+), 3209 deletions(-)
When the already queued changes, agreed on changes and the ongoing printk work is taken out then the diffstat is reduced to:
311 files changed, 6567 insertions(+), 1352 deletions(-)
Out of the 6567 insertions about 4000 lines are the self contained RT infrastructure (lock substitutions, scheduler addons, etc.).
The remaining bits and pieces are smallish changes to places which need to be slightly modified to cope with the RT semantics.
The current full RT set can be found here:
git://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git linux-5.2.y-rt
Note that aside of the printk changes (which are under flux due to the ongoing review/design discussions) also a large part of the rest is not the final state as these changes still need to be discussed with the relevant maintainers and we are still working hard on refinining them and reducing the impact. So while the big picture is probably good reflected, please take the details with a grain of salt.
Thanks,
Thomas
PATCH 1/1 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.
--- arch/Kconfig | 3 +++ kernel/Kconfig.preempt | 25 +++++++++++++++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-)
arch/Kconfig +3 -0
@@ -809,6 +809,9 @@ config ARCH_NO_COHERENT_DMA_MMAP config ARCH_NO_PREEMPT bool +config ARCH_SUPPORTS_RT + bool + config CPU_NO_EFFICIENT_FFS def_bool n
kernel/Kconfig.preempt +23 -2
@@ -35,10 +35,10 @@ config PREEMPT_VOLUNTARY Select this if you are building a kernel for a desktop system. -config PREEMPT +config PREEMPT_LL bool "Preemptible Kernel (Low-Latency Desktop)" depends on !ARCH_NO_PREEMPT - select PREEMPT_COUNT + select PREEMPT select UNINLINE_SPIN_UNLOCK if !ARCH_INLINE_SPIN_UNLOCK help This option reduces the latency of the kernel by making
@@ -55,7 +55,28 @@ config PREEMPT embedded system with latency requirements in the milliseconds range. +config PREEMPT_RT + bool "Fully Preemptible Kernel (Real-Time)" + depends on EXPERT && ARCH_SUPPORTS_RT + select PREEMPT + help + This option turns the kernel into a real-time kernel by replacing + various locking primitives (spinlocks, rwlocks, etc) with + preemptible priority-inheritance aware variants, enforcing + interrupt threading and introducing mechanisms to break up long + non-preemtible sections. This makes the kernel, except for very + low level and critical code pathes (entry code, scheduler, low + level interrupt handling) fully preemtible and brings most + execution contexts under scheduler control. + + Select this if you are building a kernel for systems which + require real-time guarantees. + endchoice config PREEMPT_COUNT bool + +config PREEMPT + bool + select PREEMPT_COUNT
Quoted 47 lines · Thomas Gleixner
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_LLwhich select PREEMPT as well.No functional change.
Signed-off-by Thomas Gleixner <[email protected]>--- arch/Kconfig | 3 +++ kernel/Kconfig.preempt | 25 +++++++++++++++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-)arch/Kconfig +3
-0@@ -809,6 +809,9 @@ config ARCH_NO_COHERENT_DMA_MMAP config ARCH_NO_PREEMPT bool +config ARCH_SUPPORTS_RT + bool + config CPU_NO_EFFICIENT_FFS def_bool nkernel/Kconfig.preempt +2
-2@@ -35,10 +35,10 @@ config PREEMPT_VOLUNTARY Select this if you are building a kernel for a desktop system. -config PREEMPT +config PREEMPT_LL bool "Preemptible Kernel (Low-Latency Desktop)" depends on !ARCH_NO_PREEMPT - select PREEMPT_COUNT + select PREEMPT select UNINLINE_SPIN_UNLOCK if !ARCH_INLINE_SPIN_UNLOCK help This option reduces the latency of the kernel by making@@ -55,7 +55,28 @@ config PREEMPT embedded system with latency requirements in the milliseconds range.
kernel/Kconfig.preempt config PREEMPT · line 67
Quoted 10 lines
kernel/Kconfig.preempt +10
-0+config PREEMPT_RT + bool "Fully Preemptible Kernel (Real-Time)" + depends on EXPERT && ARCH_SUPPORTS_RT + select PREEMPT + help + This option turns the kernel into a real-time kernel by replacing + various locking primitives (spinlocks, rwlocks, etc) with + preemptible priority-inheritance aware variants, enforcing + interrupt threading and introducing mechanisms to break up long + non-preemtible sections. This makes the kernel, except for very
Here is a typo:
s/non-preemtible/non-preemptible/
Nice to see this feature finally getting very close to being merged :)
Lukas
Quoted 18 lines
kernel/Kconfig.preempt +11
-0+ low level and critical code pathes (entry code, scheduler, low + level interrupt handling) fully preemtible and brings most + execution contexts under scheduler control. + + Select this if you are building a kernel for systems which + require real-time guarantees. + endchoice config PREEMPT_COUNT bool + +config PREEMPT + bool + select PREEMPT_COUNT
Quoted 11 lines · Thomas Gleixner
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_LLwhich select PREEMPT as well.No functional change.
Signed-off-by Thomas Gleixner <[email protected]>
This would make it easier to get some of the remaining RCU patches from -rt to mainline, for example, the rcutorture changes proposed recently.
Quoted 63 lines
--- arch/Kconfig | 3 +++ kernel/Kconfig.preempt | 25 +++++++++++++++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-)arch/Kconfig +3
-0@@ -809,6 +809,9 @@ config ARCH_NO_COHERENT_DMA_MMAP config ARCH_NO_PREEMPT bool +config ARCH_SUPPORTS_RT + bool + config CPU_NO_EFFICIENT_FFS def_bool nkernel/Kconfig.preempt +23
-2@@ -35,10 +35,10 @@ config PREEMPT_VOLUNTARY Select this if you are building a kernel for a desktop system. -config PREEMPT +config PREEMPT_LL bool "Preemptible Kernel (Low-Latency Desktop)" depends on !ARCH_NO_PREEMPT - select PREEMPT_COUNT + select PREEMPT select UNINLINE_SPIN_UNLOCK if !ARCH_INLINE_SPIN_UNLOCK help This option reduces the latency of the kernel by making@@ -55,7 +55,28 @@ config PREEMPT embedded system with latency requirements in the milliseconds range. +config PREEMPT_RT + bool "Fully Preemptible Kernel (Real-Time)" + depends on EXPERT && ARCH_SUPPORTS_RT + select PREEMPT + help + This option turns the kernel into a real-time kernel by replacing + various locking primitives (spinlocks, rwlocks, etc) with + preemptible priority-inheritance aware variants, enforcing + interrupt threading and introducing mechanisms to break up long + non-preemtible sections. This makes the kernel, except for very + low level and critical code pathes (entry code, scheduler, low + level interrupt handling) fully preemtible and brings most + execution contexts under scheduler control. + + Select this if you are building a kernel for systems which + require real-time guarantees. + endchoice config PREEMPT_COUNT bool + +config PREEMPT + bool + select PREEMPT_COUNT
Quoted 44 lines · On Mon, 15 Jul 2019 17:04:03 +0200 Thomas Gleixner <[email protected]> wrote:
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_LLwhich select PREEMPT as well.No functional change.
Signed-off-by Thomas Gleixner <[email protected]>--- arch/Kconfig | 3 +++ kernel/Kconfig.preempt | 25 +++++++++++++++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-)arch/Kconfig +3
-0@@ -809,6 +809,9 @@ config ARCH_NO_COHERENT_DMA_MMAP config ARCH_NO_PREEMPT bool +config ARCH_SUPPORTS_RT + bool + config CPU_NO_EFFICIENT_FFS def_bool nkernel/Kconfig.preempt +2
-2@@ -35,10 +35,10 @@ config PREEMPT_VOLUNTARY Select this if you are building a kernel for a desktop system. -config PREEMPT +config PREEMPT_LL bool "Preemptible Kernel (Low-Latency Desktop)" depends on !ARCH_NO_PREEMPT - select PREEMPT_COUNT + select PREEMPT select UNINLINE_SPIN_UNLOCK if !ARCH_INLINE_SPIN_UNLOCK help This option reduces the latency of the kernel by making
kernel/Kconfig.preempt config PREEMPT · line 60
Quoted 6 lines
kernel/Kconfig.preempt +3
-0@@ -55,7 +55,28 @@ config PREEMPT embedded system with latency requirements in the milliseconds range. +config PREEMPT_RT + bool "Fully Preemptible Kernel (Real-Time)" + depends on EXPERT && ARCH_SUPPORTS_RT
I can't wait to see the CONFIG_ARCH_SUPPORTS_RT added!
-- Steve
Quoted 23 lines
kernel/Kconfig.preempt +18
-0+ select PREEMPT + help + This option turns the kernel into a real-time kernel by replacing + various locking primitives (spinlocks, rwlocks, etc) with + preemptible priority-inheritance aware variants, enforcing + interrupt threading and introducing mechanisms to break up long + non-preemtible sections. This makes the kernel, except for very + low level and critical code pathes (entry code, scheduler, low + level interrupt handling) fully preemtible and brings most + execution contexts under scheduler control. + + Select this if you are building a kernel for systems which + require real-time guarantees. + endchoice config PREEMPT_COUNT bool + +config PREEMPT + bool + select PREEMPT_COUNT
Quoted 11 lines · On Mon, 15 Jul 2019 17:04:03 +0200 Thomas Gleixner <[email protected]> wrote:
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_LLwhich select PREEMPT as well.No functional change.
Signed-off-by Thomas Gleixner <[email protected]>
Excited to see this Thomas. Now I can start planning to build from a single tree rather than an RT tree off to the side of RHEL :)
Quoted 63 lines
--- arch/Kconfig | 3 +++ kernel/Kconfig.preempt | 25 +++++++++++++++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-)arch/Kconfig +3
-0@@ -809,6 +809,9 @@ config ARCH_NO_COHERENT_DMA_MMAP config ARCH_NO_PREEMPT bool +config ARCH_SUPPORTS_RT + bool + config CPU_NO_EFFICIENT_FFS def_bool nkernel/Kconfig.preempt +23
-2@@ -35,10 +35,10 @@ config PREEMPT_VOLUNTARY Select this if you are building a kernel for a desktop system. -config PREEMPT +config PREEMPT_LL bool "Preemptible Kernel (Low-Latency Desktop)" depends on !ARCH_NO_PREEMPT - select PREEMPT_COUNT + select PREEMPT select UNINLINE_SPIN_UNLOCK if !ARCH_INLINE_SPIN_UNLOCK help This option reduces the latency of the kernel by making@@ -55,7 +55,28 @@ config PREEMPT embedded system with latency requirements in the milliseconds range. +config PREEMPT_RT + bool "Fully Preemptible Kernel (Real-Time)" + depends on EXPERT && ARCH_SUPPORTS_RT + select PREEMPT + help + This option turns the kernel into a real-time kernel by replacing + various locking primitives (spinlocks, rwlocks, etc) with + preemptible priority-inheritance aware variants, enforcing + interrupt threading and introducing mechanisms to break up long + non-preemtible sections. This makes the kernel, except for very + low level and critical code pathes (entry code, scheduler, low + level interrupt handling) fully preemtible and brings most + execution contexts under scheduler control. + + Select this if you are building a kernel for systems which + require real-time guarantees. + endchoice config PREEMPT_COUNT bool + +config PREEMPT + bool + select PREEMPT_COUNT
Signature · 2 lines
The United States Coast Guard Ruining Natural Selection since 1790
Daniel Bristot de Oliveira
Acked-byQuoted 11 lines · Clark Williams
Quoted 8 lines · On Mon, 15 Jul 2019 17:04:03 +0200 Thomas Gleixner <[email protected]> wrote:
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_LLwhich select PREEMPT as well.
Quoted 8 lines
Quoted 3 lines
No functional change.
Signed-off-by Thomas Gleixner <[email protected]>Excited to see this Thomas. Now I can start planning to build from a single tree rather than an RT tree off to the side of RHEL :)
Acked-by Clark Williams <[email protected]>
yeah! We (Red Hat) are committed with maintaining and testing the PREEMPT RT mainstream in the long term. Including the development of more tests and formal verification for it!
Thanks!
-- Daniel
Frederic Weisbecker
Acked-byQuoted 10 lines · Daniel Bristot de Oliveira
Quoted 5 lines · Clark Williams
Excited to see this Thomas. Now I can start planning to build from a single tree rather than an RT tree off to the side of RHEL :)
Acked-by Clark Williams <[email protected]>yeah! We (Red Hat) are committed with maintaining and testing the PREEMPT RT mainstream in the long term. Including the development of more tests and formal verification for it!
AND MY AXE!!! (Suse)
Quoted 5 lines
Thanks!
-- Daniel
Quoted 44 lines · Thomas Gleixner
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_LLwhich select PREEMPT as well.No functional change.
Signed-off-by Thomas Gleixner <[email protected]>--- arch/Kconfig | 3 +++ kernel/Kconfig.preempt | 25 +++++++++++++++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-)arch/Kconfig +3
-0@@ -809,6 +809,9 @@ config ARCH_NO_COHERENT_DMA_MMAP config ARCH_NO_PREEMPT bool +config ARCH_SUPPORTS_RT + bool + config CPU_NO_EFFICIENT_FFS def_bool nkernel/Kconfig.preempt +2
-2@@ -35,10 +35,10 @@ config PREEMPT_VOLUNTARY Select this if you are building a kernel for a desktop system. -config PREEMPT +config PREEMPT_LL bool "Preemptible Kernel (Low-Latency Desktop)" depends on !ARCH_NO_PREEMPT - select PREEMPT_COUNT + select PREEMPT select UNINLINE_SPIN_UNLOCK if !ARCH_INLINE_SPIN_UNLOCK help This option reduces the latency of the kernel by making
kernel/Kconfig.preempt config PREEMPT · line 64
Quoted 10 lines
kernel/Kconfig.preempt +7
-0@@ -55,7 +55,28 @@ config PREEMPT embedded system with latency requirements in the milliseconds range. +config PREEMPT_RT + bool "Fully Preemptible Kernel (Real-Time)" + depends on EXPERT && ARCH_SUPPORTS_RT + select PREEMPT + help + This option turns the kernel into a real-time kernel by replacing + various locking primitives (spinlocks, rwlocks, etc) with
s/etc/etc.
kernel/Kconfig.preempt config PREEMPT · line 67
Quoted 3 lines
kernel/Kconfig.preempt +3
-0+ preemptible priority-inheritance aware variants, enforcing + interrupt threading and introducing mechanisms to break up long + non-preemtible sections. This makes the kernel, except for very
s/preemtible/preemptible
kernel/Kconfig.preempt config PREEMPT · line 69
Quoted 2 lines
kernel/Kconfig.preempt +2
-0+ low level and critical code pathes (entry code, scheduler, low + level interrupt handling) fully preemtible and brings most
s/preemtible/preemptible
kernel/Kconfig.preempt config PREEMPT · line 73
Quoted 4 lines
kernel/Kconfig.preempt +4
-0+ execution contexts under scheduler control. + + Select this if you are building a kernel for systems which + require real-time guarantees.
Nice to see this getting started! :-)
Thanks,
Ingo
Quoted 11 lines · Thomas Gleixner
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_LLwhich select PREEMPT as well.No functional change.
Signed-off-by Thomas Gleixner <[email protected]>
+1 from National Instruments. We have a vested interest in preempt_rt and we're committed in helping support, maintain, and test it. Glad to see this happening.
Thanks,
Gratian
Quoted 61 lines
--- arch/Kconfig | 3 +++ kernel/Kconfig.preempt | 25 +++++++++++++++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-)arch/Kconfig +3
-0@@ -809,6 +809,9 @@ config ARCH_NO_COHERENT_DMA_MMAP config ARCH_NO_PREEMPT bool +config ARCH_SUPPORTS_RT + bool + config CPU_NO_EFFICIENT_FFS def_bool nkernel/Kconfig.preempt +23
-2@@ -35,10 +35,10 @@ config PREEMPT_VOLUNTARY Select this if you are building a kernel for a desktop system. -config PREEMPT +config PREEMPT_LL bool "Preemptible Kernel (Low-Latency Desktop)" depends on !ARCH_NO_PREEMPT - select PREEMPT_COUNT + select PREEMPT select UNINLINE_SPIN_UNLOCK if !ARCH_INLINE_SPIN_UNLOCK help This option reduces the latency of the kernel by making@@ -55,7 +55,28 @@ config PREEMPT embedded system with latency requirements in the milliseconds range. +config PREEMPT_RT + bool "Fully Preemptible Kernel (Real-Time)" + depends on EXPERT && ARCH_SUPPORTS_RT + select PREEMPT + help + This option turns the kernel into a real-time kernel by replacing + various locking primitives (spinlocks, rwlocks, etc) with + preemptible priority-inheritance aware variants, enforcing + interrupt threading and introducing mechanisms to break up long + non-preemtible sections. This makes the kernel, except for very + low level and critical code pathes (entry code, scheduler, low + level interrupt handling) fully preemtible and brings most + execution contexts under scheduler control. + + Select this if you are building a kernel for systems which + require real-time guarantees. + endchoice config PREEMPT_COUNT bool + +config PREEMPT + bool + select PREEMPT_COUNT
Quoted 11 lines · Thomas Gleixner
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_LLwhich select PREEMPT as well.No functional change.
Signed-off-by Thomas Gleixner <[email protected]>
Quoted 63 lines
--- arch/Kconfig | 3 +++ kernel/Kconfig.preempt | 25 +++++++++++++++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-)arch/Kconfig +3
-0@@ -809,6 +809,9 @@ config ARCH_NO_COHERENT_DMA_MMAP config ARCH_NO_PREEMPT bool +config ARCH_SUPPORTS_RT + bool + config CPU_NO_EFFICIENT_FFS def_bool nkernel/Kconfig.preempt +23
-2@@ -35,10 +35,10 @@ config PREEMPT_VOLUNTARY Select this if you are building a kernel for a desktop system. -config PREEMPT +config PREEMPT_LL bool "Preemptible Kernel (Low-Latency Desktop)" depends on !ARCH_NO_PREEMPT - select PREEMPT_COUNT + select PREEMPT select UNINLINE_SPIN_UNLOCK if !ARCH_INLINE_SPIN_UNLOCK help This option reduces the latency of the kernel by making@@ -55,7 +55,28 @@ config PREEMPT embedded system with latency requirements in the milliseconds range. +config PREEMPT_RT + bool "Fully Preemptible Kernel (Real-Time)" + depends on EXPERT && ARCH_SUPPORTS_RT + select PREEMPT + help + This option turns the kernel into a real-time kernel by replacing + various locking primitives (spinlocks, rwlocks, etc) with + preemptible priority-inheritance aware variants, enforcing + interrupt threading and introducing mechanisms to break up long + non-preemtible sections. This makes the kernel, except for very + low level and critical code pathes (entry code, scheduler, low + level interrupt handling) fully preemtible and brings most + execution contexts under scheduler control. + + Select this if you are building a kernel for systems which + require real-time guarantees. + endchoice config PREEMPT_COUNT bool + +config PREEMPT + bool + select PREEMPT_COUNT
Quoted 11 lines · Thomas Gleixner
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_LLwhich select PREEMPT as well.No functional change.
Signed-off-by Thomas Gleixner <[email protected]>
M.
Signature · 1 line
Jazz is not dead. It just smells funny...
Hi,
Quoted 11 lines · Thomas Gleixner
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_LLwhich select PREEMPT as well.No functional change.
Signed-off-by Thomas Gleixner <[email protected]>
As one of the stable-rt maintainers I love to see this move forward!
PATCH v2 1/1 Kconfig: Introduce CONFIG_PREEMPT_RT
In reply to Thomas GleixnerAdd 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.
---
V2: Fix typos in help text, collect acks
--- arch/Kconfig | 3 +++ kernel/Kconfig.preempt | 25 +++++++++++++++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-)
arch/Kconfig +3 -0
@@ -809,6 +809,9 @@ config ARCH_NO_COHERENT_DMA_MMAP config ARCH_NO_PREEMPT bool +config ARCH_SUPPORTS_RT + bool + config CPU_NO_EFFICIENT_FFS def_bool n
kernel/Kconfig.preempt +23 -2
@@ -35,10 +35,10 @@ config PREEMPT_VOLUNTARY Select this if you are building a kernel for a desktop system. -config PREEMPT +config PREEMPT_LL bool "Preemptible Kernel (Low-Latency Desktop)" depends on !ARCH_NO_PREEMPT - select PREEMPT_COUNT + select PREEMPT select UNINLINE_SPIN_UNLOCK if !ARCH_INLINE_SPIN_UNLOCK help This option reduces the latency of the kernel by making
@@ -55,7 +55,28 @@ config PREEMPT embedded system with latency requirements in the milliseconds range. +config PREEMPT_RT + bool "Fully Preemptible Kernel (Real-Time)" + depends on EXPERT && ARCH_SUPPORTS_RT + select PREEMPT + help + This option turns the kernel into a real-time kernel by replacing + various locking primitives (spinlocks, rwlocks, etc.) with + preemptible priority-inheritance aware variants, enforcing + interrupt threading and introducing mechanisms to break up long + non-preemptible sections. This makes the kernel, except for very + low level and critical code pathes (entry code, scheduler, low + level interrupt handling) fully preemptible and brings most + execution contexts under scheduler control. + + Select this if you are building a kernel for systems which + require real-time guarantees. + endchoice config PREEMPT_COUNT bool + +config PREEMPT + bool + select PREEMPT_COUNT
tip-bot for Thomas Gleixner
merge bot[tip:sched/urgent] sched/rt, Kconfig: Introduce CONFIG_PREEMPT_RT
sched/rt, Kconfig: Introduce CONFIG_PREEMPT_RT
Commit-ID: 2c2ffb925b368a1f00d4ddcc837f830394861d6c Gitweb: https://git.kernel.org/tip/2c2ffb925b368a1f00d4ddcc837f830394861d6c Author: Thomas Gleixner <[email protected]> AuthorDate: Wed, 17 Jul 2019 22:01:49 +0200 Committer: Ingo Molnar <[email protected]> CommitDate: Thu, 18 Jul 2019 14:53:32 +0200
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.
--- arch/Kconfig | 3 +++ kernel/Kconfig.preempt | 25 +++++++++++++++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-)
arch/Kconfig +3 -0
@@ -801,6 +801,9 @@ config ARCH_NO_COHERENT_DMA_MMAP config ARCH_NO_PREEMPT bool +config ARCH_SUPPORTS_RT + bool + config CPU_NO_EFFICIENT_FFS def_bool n
kernel/Kconfig.preempt +23 -2
@@ -35,10 +35,10 @@ config PREEMPT_VOLUNTARY Select this if you are building a kernel for a desktop system. -config PREEMPT +config PREEMPT_LL bool "Preemptible Kernel (Low-Latency Desktop)" depends on !ARCH_NO_PREEMPT - select PREEMPT_COUNT + select PREEMPT select UNINLINE_SPIN_UNLOCK if !ARCH_INLINE_SPIN_UNLOCK help This option reduces the latency of the kernel by making
@@ -55,7 +55,28 @@ config PREEMPT embedded system with latency requirements in the milliseconds range. +config PREEMPT_RT + bool "Fully Preemptible Kernel (Real-Time)" + depends on EXPERT && ARCH_SUPPORTS_RT + select PREEMPT + help + This option turns the kernel into a real-time kernel by replacing + various locking primitives (spinlocks, rwlocks, etc.) with + preemptible priority-inheritance aware variants, enforcing + interrupt threading and introducing mechanisms to break up long + non-preemptible sections. This makes the kernel, except for very + low level and critical code pathes (entry code, scheduler, low + level interrupt handling) fully preemptible and brings most + execution contexts under scheduler control. + + Select this if you are building a kernel for systems which + require real-time guarantees. + endchoice config PREEMPT_COUNT bool + +config PREEMPT + bool + select PREEMPT_COUNT
Quoted 20 lines · Thomas Gleixner
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_LLwhich select PREEMPT as well.No functional change.
Signed-off-by Thomas Gleixner <[email protected]>Acked-by Paul E. McKenney <[email protected]>Acked-by Clark Williams <[email protected]>Acked-by Ingo Molnar <[email protected]>Acked-by Marc Zyngier <[email protected]>Acked-by Daniel Wagner <[email protected]>
Quoted 1 line
---
I'm excited to see where this goes.
Julia
tip-bot for Thomas Gleixner
merge bot[tip:sched/urgent] sched/rt, Kconfig: Introduce CONFIG_PREEMPT_RT
In reply to Thomas Gleixnersched/rt, Kconfig: Introduce CONFIG_PREEMPT_RT
Commit-ID: a003296b7a97dedccb0c35c4c1e44e088050b8c4 Gitweb: https://git.kernel.org/tip/a003296b7a97dedccb0c35c4c1e44e088050b8c4 Author: Thomas Gleixner <[email protected]> AuthorDate: Wed, 17 Jul 2019 22:01:49 +0200 Committer: Ingo Molnar <[email protected]> CommitDate: Thu, 18 Jul 2019 19:47:11 +0200
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.
--- arch/Kconfig | 3 +++ kernel/Kconfig.preempt | 25 +++++++++++++++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-)
arch/Kconfig +3 -0
@@ -801,6 +801,9 @@ config ARCH_NO_COHERENT_DMA_MMAP config ARCH_NO_PREEMPT bool +config ARCH_SUPPORTS_RT + bool + config CPU_NO_EFFICIENT_FFS def_bool n
kernel/Kconfig.preempt +23 -2
@@ -35,10 +35,10 @@ config PREEMPT_VOLUNTARY Select this if you are building a kernel for a desktop system. -config PREEMPT +config PREEMPT_LL bool "Preemptible Kernel (Low-Latency Desktop)" depends on !ARCH_NO_PREEMPT - select PREEMPT_COUNT + select PREEMPT select UNINLINE_SPIN_UNLOCK if !ARCH_INLINE_SPIN_UNLOCK help This option reduces the latency of the kernel by making
@@ -55,7 +55,28 @@ config PREEMPT embedded system with latency requirements in the milliseconds range. +config PREEMPT_RT + bool "Fully Preemptible Kernel (Real-Time)" + depends on EXPERT && ARCH_SUPPORTS_RT + select PREEMPT + help + This option turns the kernel into a real-time kernel by replacing + various locking primitives (spinlocks, rwlocks, etc.) with + preemptible priority-inheritance aware variants, enforcing + interrupt threading and introducing mechanisms to break up long + non-preemptible sections. This makes the kernel, except for very + low level and critical code pathes (entry code, scheduler, low + level interrupt handling) fully preemptible and brings most + execution contexts under scheduler control. + + Select this if you are building a kernel for systems which + require real-time guarantees. + endchoice config PREEMPT_COUNT bool + +config PREEMPT + bool + select PREEMPT_COUNT
Hi,
Quoted 24 lines · Thomas Gleixner
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 toPREEMPT_LLwhich select PREEMPT as
well.No functional change.
Signed-off-by Thomas Gleixner <[email protected]>Acked-by Paul E. McKenney <[email protected]>Acked-by Clark Williams <[email protected]>Acked-by Ingo Molnar <[email protected]>Acked-by Marc Zyngier <[email protected]>Acked-by Daniel Wagner <[email protected]>
Quoted 1 line
---
As one of the stable-rt maintainers, I'd obviously be very happy to see this finally go in. :-)
And will be happy to do what I can to help with the remaining 311...
Quoted 69 lines
V2: Fix typos in help text, collect acks
--- arch/Kconfig | 3 +++ kernel/Kconfig.preempt | 25 +++++++++++++++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-)arch/Kconfig +3
-0@@ -809,6 +809,9 @@ config ARCH_NO_COHERENT_DMA_MMAP config ARCH_NO_PREEMPT bool +config ARCH_SUPPORTS_RT + bool + config CPU_NO_EFFICIENT_FFS def_bool nkernel/Kconfig.preempt +0
-0@@ -35,10 +35,10 @@ config PREEMPT_VOLUNTARY Select this if you are building a kernel for a desktopsystem.
kernel/Kconfig.preempt +2
-2-config PREEMPT +config PREEMPT_LL bool "Preemptible Kernel (Low-Latency Desktop)" depends on !ARCH_NO_PREEMPT - select PREEMPT_COUNT + select PREEMPT select UNINLINE_SPIN_UNLOCK if !ARCH_INLINE_SPIN_UNLOCK help This option reduces the latency of the kernel by making@@ -55,7 +55,28 @@ config PREEMPT embedded system with latency requirements in themilliseconds
kernel/Kconfig.preempt +6
-0range. +config PREEMPT_RT + bool "Fully Preemptible Kernel (Real-Time)" + depends on EXPERT && ARCH_SUPPORTS_RT + select PREEMPT + help + This option turns the kernel into a real-time kernel byreplacing
kernel/Kconfig.preempt +3
-0+ various locking primitives (spinlocks, rwlocks, etc.) with + preemptible priority-inheritance aware variants, enforcing + interrupt threading and introducing mechanisms to break uplong
kernel/Kconfig.preempt +1
-0+ non-preemptible sections. This makes the kernel, exceptfor very
kernel/Kconfig.preempt +1
-0+ low level and critical code pathes (entry code, scheduler,low
kernel/Kconfig.preempt +1
-0+ level interrupt handling) fully preemptible and bringsmost
kernel/Kconfig.preempt +9
-0+ execution contexts under scheduler control. + + Select this if you are building a kernel for systems which + require real-time guarantees. + endchoice config PREEMPT_COUNT bool + +config PREEMPT + bool + select PREEMPT_COUNT
tip-bot for Thomas Gleixner
merge bot[tip:sched/urgent] sched/rt, Kconfig: Introduce CONFIG_PREEMPT_RT
In reply to Thomas Gleixnersched/rt, Kconfig: Introduce CONFIG_PREEMPT_RT
Commit-ID: a50a3f4b6a313dc76912bd4ad3b8b4f4b479c801 Gitweb: https://git.kernel.org/tip/a50a3f4b6a313dc76912bd4ad3b8b4f4b479c801 Author: Thomas Gleixner <[email protected]> AuthorDate: Wed, 17 Jul 2019 22:01:49 +0200 Committer: Ingo Molnar <[email protected]> CommitDate: Thu, 18 Jul 2019 23:10:57 +0200
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.
--- arch/Kconfig | 3 +++ kernel/Kconfig.preempt | 25 +++++++++++++++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-)
arch/Kconfig +3 -0
@@ -801,6 +801,9 @@ config ARCH_NO_COHERENT_DMA_MMAP config ARCH_NO_PREEMPT bool +config ARCH_SUPPORTS_RT + bool + config CPU_NO_EFFICIENT_FFS def_bool n
kernel/Kconfig.preempt +23 -2
@@ -35,10 +35,10 @@ config PREEMPT_VOLUNTARY Select this if you are building a kernel for a desktop system. -config PREEMPT +config PREEMPT_LL bool "Preemptible Kernel (Low-Latency Desktop)" depends on !ARCH_NO_PREEMPT - select PREEMPT_COUNT + select PREEMPT select UNINLINE_SPIN_UNLOCK if !ARCH_INLINE_SPIN_UNLOCK help This option reduces the latency of the kernel by making
@@ -55,7 +55,28 @@ config PREEMPT embedded system with latency requirements in the milliseconds range. +config PREEMPT_RT + bool "Fully Preemptible Kernel (Real-Time)" + depends on EXPERT && ARCH_SUPPORTS_RT + select PREEMPT + help + This option turns the kernel into a real-time kernel by replacing + various locking primitives (spinlocks, rwlocks, etc.) with + preemptible priority-inheritance aware variants, enforcing + interrupt threading and introducing mechanisms to break up long + non-preemptible sections. This makes the kernel, except for very + low level and critical code pathes (entry code, scheduler, low + level interrupt handling) fully preemptible and brings most + execution contexts under scheduler control. + + Select this if you are building a kernel for systems which + require real-time guarantees. + endchoice config PREEMPT_COUNT bool + +config PREEMPT + bool + select PREEMPT_COUNT
Quoted 4 lines · Thomas Gleixner
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.
Quoted 8 lines
It selects PREEMPT as the RT features depend on it. To achieve that the existing PREEMPT choice is renamed to
PREEMPT_LLwhich select PREEMPT as well.No functional change.
Signed-off-by Thomas Gleixner <[email protected]>---
Glad to see this important step being taken!