Re: [PATCH v2 2/4] sched/idle: Don't handle polling idle as dynticks idle

From: Peter Zijlstra

Date: Wed Nov 11 2026 - 12:28:49 EST


On Wed, Nov 11, 2026 at 05:57:02PM +0100, Frederic Weisbecker wrote:
> Le Wed, Nov 11, 2026 at 12:43:48PM +0100, Marco Crivellari a écrit :
> > TS_FLAG_INIDLE tells nohz whether the tick is managed by the idle loop or
> > on IRQ exit. With idle=poll it is set while polling, but cpu_idle_poll()
> > doesn't run the idle loop again on interrupts: a nohz_full kick or the
> > expiry of a stopped tick isn't re-evaluated until something sets
> > TIF_NEED_RESCHED. The tick is therefore restarted before polling, and on
> > nohz_full CPUs it then keeps running after the wake-up and interrupts
> > userspace.
> >
> > Enter dynticks idle only on the cpuidle path, from cpuidle_idle_call(),
> > and leave it before cpu_idle_poll(). While polling, the tick is then
> > managed on IRQ exit as for a running task: on nohz_full CPUs it stays
> > stopped if possible, and nothing is left to do on wake-up, so the task
> > doesn't pay for a tick stop after waking up. On other CPUs, leaving
> > dynticks idle restarts the tick as before.
> >
> > tick_nohz_idle_enter() may now be called on each idle loop iteration and
> > always runs with interrupts disabled; tick_nohz_idle_exit() may be called
> > outside dynticks idle and with interrupts disabled.
> >
> > Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
> > Cc: Juri Lelli <juri.lelli@xxxxxxxxxx>
> > Cc: Vincent Guittot <vincent.guittot@xxxxxxxxxx>
> > Cc: Dietmar Eggemann <dietmar.eggemann@xxxxxxx>
> > Cc: Steven Rostedt <rostedt@xxxxxxxxxxx>
> > Cc: Ben Segall <bsegall@xxxxxxxxxx>
> > Cc: Mel Gorman <mgorman@xxxxxxx>
> > Cc: Valentin Schneider <vschneid@xxxxxxxxxx>
> > Cc: K Prateek Nayak <kprateek.nayak@xxxxxxx>
> > Cc: Paul E. McKenney <paulmck@xxxxxxxxxx>
> > Cc: Anna-Maria Behnsen <anna-maria@xxxxxxxxxxxxx>
> > Cc: Thomas Gleixner <tglx@xxxxxxxxxx>
> > Link: https://lore.kernel.org/all/aQiWfnnSzxsnwa2o@tpad/
> > Suggested-by: Frederic Weisbecker <frederic@xxxxxxxxxx>
> > Signed-off-by: Marco Crivellari <marco.crivellari@xxxxxxxx>
>
> Reviewed-by: Frederic Weisbecker <frederic@xxxxxxxxxx>

So because I only receive one out of four patches, I've been ignoring
this...