[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20260123210433.GA3268448@noisy.programming.kicks-ass.net>
Date: Fri, 23 Jan 2026 22:04:33 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: tglx@...utronix.de, arnd@...db.de, anna-maria@...utronix.de,
frederic@...nel.org, luto@...nel.org, mingo@...hat.com,
juri.lelli@...hat.com, vincent.guittot@...aro.org,
dietmar.eggemann@....com, bsegall@...gle.com, mgorman@...e.de,
vschneid@...hat.com, linux-kernel@...r.kernel.org,
oliver.sang@...el.com
Subject: Re: [PATCH v2 5/6] entry,hrtimer: Push reprogramming timers into the
interrupt return path
On Fri, Jan 23, 2026 at 03:08:43PM -0500, Steven Rostedt wrote:
> On Wed, 21 Jan 2026 17:20:15 +0100
> Peter Zijlstra <peterz@...radead.org> wrote:
>
> > +#ifdef TIF_HRTIMER_REARM
> > +void _hrtimer_rearm(void)
> > +{
> > + struct hrtimer_cpu_base *cpu_base = this_cpu_ptr(&hrtimer_bases);
> > + ktime_t now, expires_next;
> > +
> > + lockdep_assert_irqs_disabled();
> > +
> > + scoped_guard (raw_spinlock, &cpu_base->lock) {
> > + now = hrtimer_update_base(cpu_base);
> > + expires_next = hrtimer_update_next_event(cpu_base);
> > + __hrtimer_rearm(cpu_base, now, expires_next);
> > + clear_thread_flag(TIF_HRTIMER_REARM);
> > + }
> > +}
>
> I'm curious to why you decided to use scoped_guard() here and not just
> guard() and not add the extra indentation? The function is small enough
> where everything is expected to be protected by the spinlock.
Yeah, I'm not entirely sure... its been over 6 months since I wrote this
code :-/
Powered by blists - more mailing lists