Re: [PATCH v3 1/5] tick/nohz: Re-evaluate the tick on return to user space

From: Frederic Weisbecker

Date: Sat Nov 14 2026 - 15:43:58 EST


Le Thu, Nov 12, 2026 at 05:38:09PM +0100, Marco Crivellari a écrit :
> On nohz_full CPUs the tick is re-evaluated on IRQ exit and on idle exit.
>
> This is not enough on return to user space. If the tick is left running in
> the kernel, for example because a tick dependency was cleared
> (tick_nohz_dep_clear*() don't kick the CPU) or a timer that kept it
> running was cancelled, it fires at least once in userspace before
> tick_nohz_irq_exit() stops it.
>
> Stop it from context tracking right before resuming userspace. When the
> tick is already stopped, the common case, this costs a few flag tests on
> each return to userspace.
>
> Suggested-by: Frederic Weisbecker <frederic@xxxxxxxxxx>
> Signed-off-by: Marco Crivellari <marco.crivellari@xxxxxxxx>

Reviewed-by: Frederic Weisbecker <frederic@xxxxxxxxxx>

--
Frederic Weisbecker
SUSE Labs