2019-07-15 16:12:44

by Thomas Gleixner

[permalink] [raw]
Subject: [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.

Signed-off-by: Thomas Gleixner <[email protected]>
---
arch/Kconfig | 3 +++
kernel/Kconfig.preempt | 25 +++++++++++++++++++++++--
2 files changed, 26 insertions(+), 2 deletions(-)

--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -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

--- a/kernel/Kconfig.preempt
+++ b/kernel/Kconfig.preempt
@@ -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



2019-07-15 19:50:14

by Lukas Bulwahn

[permalink] [raw]
Subject: Re: [patch 1/1] Kconfig: Introduce CONFIG_PREEMPT_RT



On Mon, 15 Jul 2019, Thomas Gleixner 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_LL which 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(-)
>
> --- a/arch/Kconfig
> +++ b/arch/Kconfig
> @@ -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
>
> --- a/kernel/Kconfig.preempt
> +++ b/kernel/Kconfig.preempt
> @@ -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

Here is a typo:

s/non-preemtible/non-preemptible/

Nice to see this feature finally getting very close to being merged :)

Lukas

> + 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
>
>
>

2019-07-16 18:21:36

by Paul E. McKenney

[permalink] [raw]
Subject: Re: [patch 1/1] Kconfig: Introduce CONFIG_PREEMPT_RT

On Mon, Jul 15, 2019 at 05:04:03PM +0200, Thomas Gleixner 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_LL which 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.

Acked-by: Paul E. McKenney <[email protected]>

> ---
> arch/Kconfig | 3 +++
> kernel/Kconfig.preempt | 25 +++++++++++++++++++++++--
> 2 files changed, 26 insertions(+), 2 deletions(-)
>
> --- a/arch/Kconfig
> +++ b/arch/Kconfig
> @@ -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
>
> --- a/kernel/Kconfig.preempt
> +++ b/kernel/Kconfig.preempt
> @@ -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
>
>

2019-07-16 20:08:51

by Steven Rostedt

[permalink] [raw]
Subject: Re: [patch 1/1] Kconfig: Introduce CONFIG_PREEMPT_RT

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_LL which 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(-)
>
> --- a/arch/Kconfig
> +++ b/arch/Kconfig
> @@ -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
>
> --- a/kernel/Kconfig.preempt
> +++ b/kernel/Kconfig.preempt
> @@ -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

I can't wait to see the CONFIG_ARCH_SUPPORTS_RT added!

Acked-by: Steven Rostedt (VMware) <[email protected]>

-- Steve


> + 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
>

2019-07-16 20:11:42

by Clark Williams

[permalink] [raw]
Subject: Re: [patch 1/1] Kconfig: Introduce CONFIG_PREEMPT_RT

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_LL which 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 :)

Acked-by: Clark Williams <[email protected]>

> ---
> arch/Kconfig | 3 +++
> kernel/Kconfig.preempt | 25 +++++++++++++++++++++++--
> 2 files changed, 26 insertions(+), 2 deletions(-)
>
> --- a/arch/Kconfig
> +++ b/arch/Kconfig
> @@ -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
>
> --- a/kernel/Kconfig.preempt
> +++ b/kernel/Kconfig.preempt
> @@ -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
>
>


--
The United States Coast Guard
Ruining Natural Selection since 1790

Subject: Re: [patch 1/1] Kconfig: Introduce CONFIG_PREEMPT_RT

On 16/07/2019 22:10, Clark Williams wrote:
> 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_LL which 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 :)
>
> 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!

Acked-by: Daniel Bristot de Oliveira <[email protected]>

Thanks!
-- Daniel

2019-07-16 21:01:14

by Frederic Weisbecker

[permalink] [raw]
Subject: Re: [patch 1/1] Kconfig: Introduce CONFIG_PREEMPT_RT

On Tue, Jul 16, 2019 at 10:18:00PM +0200, Daniel Bristot de Oliveira wrote:
> On 16/07/2019 22:10, Clark Williams wrote:
> > 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)

Acked-by: Frederic Weisbecker <[email protected]>

>
> Acked-by: Daniel Bristot de Oliveira <[email protected]>
>
> Thanks!
> -- Daniel

2019-07-16 22:59:33

by Ingo Molnar

[permalink] [raw]
Subject: Re: [patch 1/1] Kconfig: Introduce CONFIG_PREEMPT_RT


* 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_LL which 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(-)
>
> --- a/arch/Kconfig
> +++ b/arch/Kconfig
> @@ -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
>
> --- a/kernel/Kconfig.preempt
> +++ b/kernel/Kconfig.preempt
> @@ -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

s/etc/etc.

> + 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

> + low level and critical code pathes (entry code, scheduler, low
> + level interrupt handling) fully preemtible and brings most

s/preemtible/preemptible

> + 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! :-)

Acked-by: Ingo Molnar <[email protected]>

Thanks,

Ingo

2019-07-17 00:04:06

by Gratian Crisan

[permalink] [raw]
Subject: Re: [patch 1/1] Kconfig: Introduce CONFIG_PREEMPT_RT


Thomas Gleixner writes:

> 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]>

+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.

Acked-by: Gratian Crisan <[email protected]>

Thanks,
Gratian

> ---
> arch/Kconfig | 3 +++
> kernel/Kconfig.preempt | 25 +++++++++++++++++++++++--
> 2 files changed, 26 insertions(+), 2 deletions(-)
>
> --- a/arch/Kconfig
> +++ b/arch/Kconfig
> @@ -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
>
> --- a/kernel/Kconfig.preempt
> +++ b/kernel/Kconfig.preempt
> @@ -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

2019-07-17 07:41:33

by Peter Zijlstra

[permalink] [raw]
Subject: Re: [patch 1/1] Kconfig: Introduce CONFIG_PREEMPT_RT

On Mon, Jul 15, 2019 at 05:04:03PM +0200, Thomas Gleixner 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_LL which select PREEMPT as
> well.
>
> No functional change.
>
> Signed-off-by: Thomas Gleixner <[email protected]>

Acked-by: Peter Zijlstra (Intel) <[email protected]>

> ---
> arch/Kconfig | 3 +++
> kernel/Kconfig.preempt | 25 +++++++++++++++++++++++--
> 2 files changed, 26 insertions(+), 2 deletions(-)
>
> --- a/arch/Kconfig
> +++ b/arch/Kconfig
> @@ -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
>
> --- a/kernel/Kconfig.preempt
> +++ b/kernel/Kconfig.preempt
> @@ -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
>
>

2019-07-17 08:00:04

by Marc Zyngier

[permalink] [raw]
Subject: Re: [patch 1/1] Kconfig: Introduce CONFIG_PREEMPT_RT

On 15/07/2019 16:04, Thomas Gleixner 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_LL which select PREEMPT as
> well.
>
> No functional change.
>
> Signed-off-by: Thomas Gleixner <[email protected]>

Acked-by: Marc Zyngier <[email protected]>

M.
--
Jazz is not dead. It just smells funny...

2019-07-17 08:54:10

by Daniel Wagner

[permalink] [raw]
Subject: Re: [patch 1/1] Kconfig: Introduce CONFIG_PREEMPT_RT

Hi,

On 7/15/19 5:04 PM, Thomas Gleixner 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_LL which 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!

Acked-by: Daniel Wagner <[email protected]>

2019-07-17 20:04:19

by Thomas Gleixner

[permalink] [raw]
Subject: [patch V2 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.

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: Ingo Molnar <[email protected]>
Acked-by: Peter Zijlstra (Intel) <[email protected]>
Acked-by: Marc Zyngier <[email protected]>
Acked-by: Daniel Wagner <[email protected]>
---
V2: Fix typos in help text, collect acks
---
arch/Kconfig | 3 +++
kernel/Kconfig.preempt | 25 +++++++++++++++++++++++--
2 files changed, 26 insertions(+), 2 deletions(-)

--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -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

--- a/kernel/Kconfig.preempt
+++ b/kernel/Kconfig.preempt
@@ -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

Subject: Re: [patch 1/1] Kconfig: Introduce CONFIG_PREEMPT_RT

On Mon, Jul 15, 2019 at 05:04:03PM +0200, Thomas Gleixner 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_LL which select PREEMPT as
> well.
>
> No functional change.
>
> Signed-off-by: Thomas Gleixner <[email protected]>
> ---

Glad to see this important step being taken!

Acked-by: Luis Claudio R. Goncalves <[email protected]>

Subject: [tip:sched/urgent] 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.

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]>
Cc: Andrew Morton <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Clark Williams <[email protected]>
Cc: Gratian Crisan <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Julia Cartwright <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Lukas Bulwahn <[email protected]>
Cc: Mike Galbraith <[email protected]>
Cc: Paul McKenney <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Sebastian Siewior <[email protected]>
Cc: Tejun Heo <[email protected]>
Cc: Tom Zanussi <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
---
arch/Kconfig | 3 +++
kernel/Kconfig.preempt | 25 +++++++++++++++++++++++--
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
config ARCH_NO_PREEMPT
bool

+config ARCH_SUPPORTS_RT
+ bool
+
config CPU_NO_EFFICIENT_FFS
def_bool n

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

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

2019-07-18 15:25:36

by Julia Cartwright

[permalink] [raw]
Subject: Re: [patch V2 1/1] Kconfig: Introduce CONFIG_PREEMPT_RT

On Wed, Jul 17, 2019 at 10:01:49PM +0200, Thomas Gleixner 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_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: Ingo Molnar <[email protected]>
> Acked-by: Peter Zijlstra (Intel) <[email protected]>
> Acked-by: Marc Zyngier <[email protected]>
> Acked-by: Daniel Wagner <[email protected]>
> ---

I'm excited to see where this goes.

Acked-by: Julia Cartwright <[email protected]>

Julia

Subject: [tip:sched/urgent] sched/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.

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]>
Cc: Andrew Morton <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Clark Williams <[email protected]>
Cc: Gratian Crisan <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Lukas Bulwahn <[email protected]>
Cc: Mike Galbraith <[email protected]>
Cc: Paul McKenney <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Sebastian Siewior <[email protected]>
Cc: Tejun Heo <[email protected]>
Cc: Tom Zanussi <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
---
arch/Kconfig | 3 +++
kernel/Kconfig.preempt | 25 +++++++++++++++++++++++--
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
config ARCH_NO_PREEMPT
bool

+config ARCH_SUPPORTS_RT
+ bool
+
config CPU_NO_EFFICIENT_FFS
def_bool n

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

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

2019-07-18 19:24:23

by Tom Zanussi

[permalink] [raw]
Subject: Re: [patch V2 1/1] Kconfig: Introduce CONFIG_PREEMPT_RT

Hi,

On Wed, 2019-07-17 at 22:01 +0200, Thomas Gleixner 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_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: Ingo Molnar <[email protected]>
> Acked-by: Peter Zijlstra (Intel) <[email protected]>
> Acked-by: Marc Zyngier <[email protected]>
> Acked-by: Daniel Wagner <[email protected]>
> ---

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...

Acked-by: Tom Zanussi <[email protected]>


> V2: Fix typos in help text, collect acks
> ---
> arch/Kconfig | 3 +++
> kernel/Kconfig.preempt | 25 +++++++++++++++++++++++--
> 2 files changed, 26 insertions(+), 2 deletions(-)
>
> --- a/arch/Kconfig
> +++ b/arch/Kconfig
> @@ -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
>
> --- a/kernel/Kconfig.preempt
> +++ b/kernel/Kconfig.preempt
> @@ -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

Subject: [tip:sched/urgent] sched/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.

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]>
---
arch/Kconfig | 3 +++
kernel/Kconfig.preempt | 25 +++++++++++++++++++++++--
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
config ARCH_NO_PREEMPT
bool

+config ARCH_SUPPORTS_RT
+ bool
+
config CPU_NO_EFFICIENT_FFS
def_bool n

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

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