[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZH5TwdrDwLqsWWRA@localhost.localdomain>
Date: Mon, 5 Jun 2023 23:29:37 +0200
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>,
Frederic Weisbecker <fweisbec@...il.com>,
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>
Subject: Re: [PATCH v7 02/21] timer: Do not IPI for deferrable timers
Le Wed, May 24, 2023 at 09:06:10AM +0200, Anna-Maria Behnsen a écrit :
> Deferrable timers do not prevent CPU from going idle and are not taken into
> account on idle path. Sending an IPI to a remote CPU when a new first
> deferrable timer was enqueued will wake up the remote CPU and but nothing
> will be done regarding the deferrable timers.
>
> Drop IPI completely when a new first deferrable timer was enqueued.
>
> Signed-off-by: Anna-Maria Behnsen <anna-maria@...utronix.de>
> ---
> v6: new patch
> ---
> kernel/time/timer.c | 15 ++++++---------
> 1 file changed, 6 insertions(+), 9 deletions(-)
>
> diff --git a/kernel/time/timer.c b/kernel/time/timer.c
> index 63a8ce7177dd..6e251e3cf659 100644
> --- a/kernel/time/timer.c
> +++ b/kernel/time/timer.c
> @@ -571,18 +571,15 @@ static int calc_wheel_index(unsigned long expires, unsigned long clk,
> static void
> trigger_dyntick_cpu(struct timer_base *base, struct timer_list *timer)
> {
> - if (!is_timers_nohz_active())
> - return;
> -
> /*
> - * TODO: This wants some optimizing similar to the code below, but we
> - * will do that when we switch from push to pull for deferrable timers.
> + * Deferrable timers do not prevent CPU from going idle and are not
> + * taken into account on idle path. An IPI when a new deferrable
Just to make sure everyone is aware that this concerns also nohz_full,
this could be:
/*
* Deferrable timers do not prevent CPU from entering dynticks
* and are not taken into account on idle/nohz_full path. An IPI
* when a new deferrable timer is enqueued will wake up the remote
* CPU but nothing will be done with the deferrable timer base.
* Therefore skip remote IPI for deferrable timers completely.
*/
But anyway:
Reviewed-by: Frederic Weisbecker <frederic@...nel.org>
Powered by blists - more mailing lists