Re: [PATCH 2/2] docs: sched-preemption: Fix the list of runtime-selectable models

From: Jinjie Ruan

Date: Mon Nov 02 2026 - 21:17:29 EST




在 2026/11/2 21:34, Sebastian Andrzej Siewior 写道:
> On 2026-10-28 10:43:33 [+0800], Jinjie Ruan wrote:
>> --- a/Documentation/scheduler/sched-preemption.rst
>> +++ b/Documentation/scheduler/sched-preemption.rst
>> @@ -20,9 +20,6 @@ change.
>> The models selectable at runtime are:
>>
>> ========= ====================================================
>> - none No preemption of kernel code other than at explicit
>> - ``cond_resched()`` / blocking points.
>> - voluntary As ``none``, plus ``might_sleep()`` sites.
>> full Any section that is not explicitly preempt disabled
>> may be preempted at any time.
>> lazy As ``full``, except that the scheduling request is
>
> This is fine.
>
>> @@ -31,10 +28,12 @@ The models selectable at runtime are:
>> apply to real-time tasks.
>> ========= ====================================================
>>
>> -Not every model is available on every kernel. An architecture that provides
>> -lazy-preempt support offers only ``full`` and ``lazy``, and ``none`` and
>> -``voluntary`` are rejected there. A PREEMPT_RT kernel always offers ``full``,
>> -and ``lazy`` as well if the architecture provides it.
>> +CONFIG_PREEMPT_DYNAMIC depends on CONFIG_ARCH_HAS_PREEMPT_LAZY, so ``none``
>> +and ``voluntary`` are never selectable at runtime; passing either is
>> +rejected with "Dynamic Preempt: unsupported mode". The two models are only
>> +left as build-time choices on architectures without lazy-preempt support.
>> +A PREEMPT_RT kernel always offers ``full``, and ``lazy`` as well if the
>> +architecture provides it.
>
> What about:
> Not every model is available on every kernel. An architecture that provides
> preemption support supports ``full``. If additionally lazy-preempt is
> supported then the choice ``lazy`` becomes available. An architecture
> without preemption support can not enable CONFIG_PREEMPT_DYNAMIC. On

Hi Sebastian,

There seems to be an issue with this sentence: PREEMPT_DYNAMIC depends
on ARCH_HAS_PREEMPT_LAZY, not “preemption support.”

What about:

Not every model is available on every kernel. A kernel built with
CONFIG_PREEMPT_DYNAMIC offers only ``full`` and ``lazy``; ``none`` and
``voluntary`` can only be chosen at build time, on architectures where
they are available. A PREEMPT_RT kernel always offers ``full``, and
``lazy`` as well if the architecture provides it.


> such an architecture the preemption model can only be selected at
> compile time.
>
> Sebastian

--
Best regards,
Jinjie