Re: [PATCH] sched: Further restrict the preemption modes

Steven Rostedt
2026-01-06T16:40:37Z

On Fri, 19 Dec 2025 11:15:02 +0100
Peter Zijlstra <peterz@infradead.org> wrote:

> --- a/kernel/Kconfig.preempt
> +++ b/kernel/Kconfig.preempt
> @@ -16,11 +16,13 @@ config ARCH_HAS_PREEMPT_LAZY
>
> choice
> prompt "Preemption Model"
> + default PREEMPT_LAZY if ARCH_HAS_PREEMPT_LAZY
> default PREEMPT_NONE

I think you can just make this:

default PREEMPT_LAZY

and remove the PREEMPT_NONE.

As PREEMPT_NONE now depends on ARCH_NO_PREEMPT and all the other options
depend on !ARCH_NO_PREEMPT, the default will be PREEMPT_LAZY if it's
available, but it will never be PREEMPT_NONE if it isn't unless
PREEMPT_NONE is the only option available.

I added default PREEMPT_LAZY and did a:

$ mkdir /tmp/build
$ make O=/tmp/build ARCH=alpha defconfig

And the result is:

CONFIG_PREEMPT_NONE_BUILD=y
CONFIG_PREEMPT_NONE=y

-- Steve

>
> config PREEMPT_NONE
> bool "No Forced Preemption (Server)"
> depends on !PREEMPT_RT
> + depends on ARCH_NO_PREEMPT
> select PREEMPT_NONE_BUILD if !PREEMPT_DYNAMIC
> help
> This is the traditional Linux preemption model, geared towards
> @@ -35,6 +37,7 @@ config PREEMPT_NONE
>
> config PREEMPT_VOLUNTARY
> bool "Voluntary Kernel Preemption (Desktop)"
> + depends on !ARCH_HAS_PREEMPT_LAZY
> depends on !ARCH_NO_PREEMPT
> depends on !PREEMPT_RT
> select PREEMPT_VOLUNTARY_BUILD if !PREEMPT_DYNAMIC