Re: [PATCH v3 7/7] sched/eevdf: Move to a single runqueue

From: Mike Galbraith

Date: Sun Oct 18 2026 - 02:51:02 EST


Greetings!

On Fri, 2026-10-16 at 15:18 +0200, Jakub Okoński wrote:
> Hi Peter,
>
> On 6/5/26 14:40, Peter Zijlstra wrote:
>
> > Change fair/cgroup to a single runqueue.
> >
> > [...]
> >
> > --- a/kernel/sched/fair.c
> > +++ b/kernel/sched/fair.c
> > @@ -9916,7 +9837,6 @@ static void wakeup_preempt_fair(struct r
> >   if (!sched_feat(WAKEUP_PREEMPTION))
> >   return;
> >  
> > - find_matching_se(&se, &pse);
> >   WARN_ON_ONCE(!pse);
> >  
> >   cse_is_idle = se_is_idle(se);
>
> I think this changes how cpu.idle affects wakeup preemption.

My box claims this to be unrelated to the jitter you're seeing, as it
is present in 7.2.11, with and without the sched-flat set applied.

> With the single runqueue, find_matching_se() is gone and se_is_idle()
> reduces to task_has_idle_policy(). Wouldn't this mean that SCHED_NORMAL
> tasks in a cpu.idle cgroup are no longer treated as idle for
> wakeup_preempt_fair()?
>
> I tested my existing 7.2.9 desktop against 7.3-rc6 with the setup below.
> cyclictest doesn't reproduce it because it just sleeps and wakes, no CPU
> burn and therefore its accrued EEVDF lag keeps the latency low?
>
> cc -O2 -o wakelat wakelat.c
> systemd-run --user --collect --unit=spin -p AllowedCPUs=7 -p CPUWeight=idle sh -c 'while :; do :; done'
> systemd-run --user --collect --wait --pipe --same-dir -p AllowedCPUs=7 ./wakelat 1000 15 200 |
>   mlr --inidx --ifs space --opprint --barred --right label lat \
>     then stats1 -a count,p50,p90,p99,max -f lat then rename -r '^lat_,' \
>     then put -q 'emit mapsum({"kernel": system("uname -r")}, $*)'
> systemctl --user stop spin
>
> wakelat wakes on a fixed 1 ms schedule, records how late each wakeup
> was, then busy-loops for 200 micros (wall clock).
>
> +-----------+-------+-----+-----+------+------+
> >    kernel | count | p50 | p90 |  p99 |  max |
> +-----------+-------+-----+-----+------+------+
> >     7.2.9 | 14998 |  11 |  11 |   12 | 1869 |
> > 7.3.0-rc6 | 13853 |  11 |  12 | 2029 | 2116 |
> +-----------+-------+-----+-----+------+------+
>
> count is out of 15000 periods. rc6 had 1147 wakeups delayed by over 1 ms.

Thanks a bunch for the proggy. I've been looking for a clear signal
with various loads, and stuffing wakelat+awk into one of my scripts
provided a perfectly clear signal, which I bisected and confirmed.

Note: below is box pointing it's little silicon finger at the source of
aforementioned jitter, not necessarily at breakage.

Reverting the fingered commit removed the jitter from 7.2.11, and force
reverting 68e37487810a + 333238da9a19 removed it from master as well.

333238da9a193ffc58792995f3e951e4cb87bfd2 is the first 'bad' commit
commit 333238da9a193ffc58792995f3e951e4cb87bfd2
Author: Vincent Guittot <vincent.guittot@xxxxxxxxxx>
Date: Fri Aug 14 15:52:41 2026 +0200

sched: Update time before requeueing delayed entities

In order to compute the right lag, it is required to update time to 'now'.
Without this, the delayed entity might appear younger than it really is and
receive less compensation for having waited.

Signed-off-by: Vincent Guittot <vincent.guittot@xxxxxxxxxx>
Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>

kernel/sched/fair.c | 2 ++
1 file changed, 2 insertions(+)