[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 2 Feb 2024 12:57:44 +0100
From: Frederic Weisbecker <frederic@...nel.org>
To: Anna-Maria Behnsen <anna-maria@...utronix.de>
Cc: linux-kernel@...r.kernel.org, Peter Zijlstra <peterz@...radead.org>,
John Stultz <jstultz@...gle.com>,
Thomas Gleixner <tglx@...utronix.de>,
Eric Dumazet <edumazet@...gle.com>,
"Rafael J . Wysocki" <rafael.j.wysocki@...el.com>,
Arjan van de Ven <arjan@...radead.org>,
"Paul E . McKenney" <paulmck@...nel.org>,
Rik van Riel <riel@...riel.com>,
Steven Rostedt <rostedt@...dmis.org>,
Sebastian Siewior <bigeasy@...utronix.de>,
Giovanni Gherdovich <ggherdovich@...e.cz>,
Lukasz Luba <lukasz.luba@....com>,
"Gautham R . Shenoy" <gautham.shenoy@....com>,
Srinivas Pandruvada <srinivas.pandruvada@...el.com>,
K Prateek Nayak <kprateek.nayak@....com>,
Richard Cochran <richardcochran@...il.com>
Subject: Re: [PATCH v10 20/20] timers: Always queue timers on the local CPU
On Thu, Feb 01, 2024 at 09:58:38PM +0100, Anna-Maria Behnsen wrote:
> Frederic Weisbecker <frederic@...nel.org> writes:
>
> > Le Mon, Jan 15, 2024 at 03:37:43PM +0100, Anna-Maria Behnsen a écrit :
> >> The timer pull model is in place so we can remove the heuristics which try
> >> to guess the best target CPU at enqueue/modification time.
> >>
> >> All non pinned timers are queued on the local CPU in the separate storage
> >> and eventually pulled at expiry time to a remote CPU.
> >>
> >> Originally-by: Richard Cochran (linutronix GmbH) <richardcochran@...il.com>
> >> Signed-off-by: Anna-Maria Behnsen <anna-maria@...utronix.de>
> >
> > Reviewed-by: Frederic Weisbecker <frederic@...nel.org>
> >
> > Just one detail below:
> >
> >> @@ -590,10 +590,13 @@ trigger_dyntick_cpu(struct timer_base *base, struct timer_list *timer)
> >>
> >> /*
> >> * We might have to IPI the remote CPU if the base is idle and the
> >> - * timer is not deferrable. If the other CPU is on the way to idle
> >> - * then it can't set base->is_idle as we hold the base lock:
> >> + * timer is pinned. If it is a non pinned timer, it is only queued
> >> + * on the remote CPU, when timer was running during queueing. Then
> >> + * everything is handled by remote CPU anyway. If the other CPU is
> >> + * on the way to idle then it can't set base->is_idle as we hold
> >> + * the base lock:
> >> */
> >> - if (base->is_idle)
> >> + if (base->is_idle && timer->flags & TIMER_PINNED)
> >
> > Is the TIMER_PINNED test necessary? If base->is_idle, then the timer
> > is now guaranteed to be TIMER_PINNED, right?
> >
>
> Yes, you are right. Should I drop it? To clarify it, I could add a
>
> WARN_ON_ONCE(!timer->flags & TIMER_PINNED)
Yep, that looks good!
Thanks.
>
> instead.
>
> Thanks,
>
> Anna-Maria
>
Powered by blists - more mailing lists