Re: [PATCH v2 2/4] sched/idle: Don't handle polling idle as dynticks idle
From: Marco Crivellari
Date: Thu Nov 12 2026 - 05:22:24 EST
Hello Prateek,
On Thu, Nov 12, 2026 at 4:28 AM K Prateek Nayak <kprateek.nayak@xxxxxxx> wrote:
>
> Hello Marco,
>
> On 11/11/2026 5:13 PM, Marco Crivellari wrote:
> > void tick_nohz_idle_exit(void)
> > {
> > struct tick_sched *ts = this_cpu_ptr(&tick_cpu_sched);
> > + unsigned long flags;
> > ktime_t now;
> >
> > - local_irq_disable();
> > + local_irq_save(flags);
>
> nit.
>
> Use:
> guard(irqsave)();
Good point, I will change it to use guard().
> and you can directly return for below condition. No "flags" or
> "out" label needed.
>
> > +
> > + if (!tick_sched_flag_test(ts, TS_FLAG_INIDLE))
> > + goto out;
> >
> > - WARN_ON_ONCE(!tick_sched_flag_test(ts, TS_FLAG_INIDLE));
> > WARN_ON_ONCE(ts->timer_expires_base);
> >
> > tick_sched_flag_clear(ts, TS_FLAG_INIDLE);
Oh right, way more cleaner.
Thanks!
--
Marco Crivellari
SUSE Labs