[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZbvWhOOblt3YPaSV@localhost.localdomain>
Date: Thu, 1 Feb 2024 18:36:04 +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
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?
Thanks.
Powered by blists - more mailing lists