Re: [PATCH 02/15] tick/nohz: Remove duplicate between lowres and highres handlers

From: Frederic Weisbecker
Date: Thu Jan 25 2024 - 06:59:01 EST


On Thu, Jan 25, 2024 at 10:32:09AM +0100, Thomas Gleixner wrote:
> On Wed, Jan 24 2024 at 18:04, Frederic Weisbecker wrote:
> > +/*
> > + * We rearm the timer until we get disabled by the idle code.
> > + * Called with interrupts disabled.
> > + */
> > +static enum hrtimer_restart tick_nohz_highres_handler(struct hrtimer *timer)
>
> Isn't that a misnomer now?

Would tick_nohz_hrtimer_handler() make more sense then? Because it's clearly
an hrtimer handler, just emulated in low-res mode.

>
> > +{
> > + struct tick_sched *ts =
> > + container_of(timer, struct tick_sched, sched_timer);
>
> Let it stick out please.

Ok.

Thanks.
>
> > + struct pt_regs *regs = get_irq_regs();
> > + ktime_t now = ktime_get();
> > + if (likely(tick_nohz_highres_handler(&ts->sched_timer) == HRTIMER_RESTART))
> > tick_program_event(hrtimer_get_expires(&ts->sched_timer), 1);
>
> Thanks,
>
> tglx