Re: sched/isolation: tick_take_do_timer_from_boot() calls smp_call_function_single() with irqs disabled

From: Oleg Nesterov
Date: Sat May 25 2024 - 10:14:59 EST


On 05/25, Oleg Nesterov wrote:
>
> perhaps we can simply kill it along with #ifdef CONFIG_NO_HZ_FULL ?
>
> if (!td->evtdev) {
> tick_cpu = READ_ONCE(tick_do_timer_cpu);
> /*
> * If no cpu took the do_timer update, assign it to
> * this cpu:
> */
> if (tick_cpu == TICK_DO_TIMER_BOOT) {
> WRITE_ONCE(tick_do_timer_cpu, cpu);
> tick_next_period = ktime_get();
> /*
> * The boot CPU may be nohz_full, in which case the
> * first housekeeping secondary will take do_timer
> * from us.
> */
> } else if (tick_nohz_full_cpu(tick_cpu) &&
> !tick_nohz_full_cpu(cpu)) {
> WRITE_ONCE(tick_do_timer_cpu, cpu);
> }

although tick_nohz_full_cpu(tick_cpu) above depends on the fact that
tick_cpu = TICK_DO_TIMER_NONE should not be possible if
tick_nohz_full_enabled(), not good.

Oleg.