Re: [PATCH 5/5] sched: Add laziest preempt model
From: Sebastian Andrzej Siewior
Date: Tue Oct 08 2024 - 11:07:34 EST
On 2024-10-07 09:46:14 [+0200], Peter Zijlstra wrote:
> Much like LAZY, except lazier still. It will not promote LAZY to full
> preempt on tick and compete with None for suckage.
>
> (do we really wants this?)
This is like NONE/ VOLUNTARY without the .*_resched().
irqentry_exit_cond_resched() and preempt_schedule.*() does nothing
because only the lazy bit is set. This should trigger all the spots
which were filled with cond_resched() to avoid warnings, right?
There is nothing that will force a preemption, right?
> Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
…
The description is the same for two lazy models.
> +config PREEMPT_LAZIEST
> + bool "Scheduler controlled preemption model"
bool "Scheduler controlled preemption model (relaxed)"
> + depends on !ARCH_NO_PREEMPT
> + depends on ARCH_HAS_PREEMPT_LAZY
> + select PREEMPT_BUILD if !PREEMPT_DYNAMIC
> + help
> + This option provides a scheduler driven preemption model that
> + is fundamentally similar to full preemption, but is least
> + eager to preempt SCHED_NORMAL tasks in an attempt to
> + reduce lock holder preemption and recover some of the performance
> + gains seen from using no preemption.
The scheduler won't force the task off-CPU if the task does
not give up voluntary.
> +
> endchoice
Sebastian