Re: sched/isolation: tick_take_do_timer_from_boot() calls smp_call_function_single() with irqs disabled
From: Frederic Weisbecker
Date: Sun May 26 2024 - 16:52:42 EST
Le Sun, May 26, 2024 at 09:27:58PM +0200, Oleg Nesterov a écrit :
> > So up to this point the tick is never stopped neither on housekeeping
> > nor on NOHZ FULL CPUs:
> >
> > tick_nohz_full_update_tick()
> > if (!tick_sched_flag_test(ts, TS_FLAG_NOHZ))
> > return;
>
> OK... But tick_nohz_idle_update_tick() doesn't check TS_FLAG_NOHZ and
> the tick_nohz_full_cpu() check can't help at boot time.
Yes but tick_nohz_idle_update_tick() is only called when the tick is already
stopped. And for the tick to be already stopped, TS_FLAG_NOHZ must have been
set.
> And I still don't understand why we can rely on can_stop_idle_tick() even
> in tick_nohz_idle_stop_tick().
Not sure I follow you on this one...
>
> I'll try to read this code again tomorrow, but it will never fit my poor
> little brain ;)
You understood more than I ever did in just a few hours :-)
But yes the tick code was much more simple before I put my own hands
inside. nohz_full and cpuidle did not arrange it.
Thanks.