[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d1baf616-1bd7-5c1-8721-4d45ae43f9@linutronix.de>
Date: Tue, 8 Nov 2022 16:30:33 +0100 (CET)
From: Anna-Maria Behnsen <anna-maria@...utronix.de>
To: Frederic Weisbecker <frederic@...nel.org>
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>
Subject: Re: [PATCH v4 09/16] timer: Split out "get next timer interrupt"
functionality
On Mon, 7 Nov 2022, Frederic Weisbecker wrote:
> On Fri, Nov 04, 2022 at 03:57:30PM +0100, Anna-Maria Behnsen wrote:
> > forward_and_idle_timer_bases() includes the functionality for getting the
> > next timer interrupt. To reuse it, it is splitted into an separate function
> > "get_next_timer_interrupt()".
> >
> > This is preparatory work for the conversion of the NOHZ timer
> > placement to a pull at expiry time model. No functional change.
> >
> > Signed-off-by: Anna-Maria Behnsen <anna-maria@...utronix.de>
> > ---
> > v4: Fix typo in comment
> > ---
> > kernel/time/timer.c | 93 +++++++++++++++++++++++++--------------------
> > 1 file changed, 51 insertions(+), 42 deletions(-)
> >
> > diff --git a/kernel/time/timer.c b/kernel/time/timer.c
> > index 680a0760e30d..853089febf83 100644
> > --- a/kernel/time/timer.c
> > +++ b/kernel/time/timer.c
> > @@ -1704,6 +1704,46 @@ static unsigned long next_timer_interrupt(struct timer_base *base)
> > return base->next_expiry;
> > }
> >
> > +static unsigned long get_next_timer_interrupt(struct timer_base *base_local,
>
> So perhaps forward_and_idle_timer_interrupt() could stay as
> "get_next_timer_interrupt()" and the new get_next_timer_interrupt() above could
> become fetch_next_timer_interrupt().
>
> Just an idea.
Hmm... it's better than mine :) I know, forward_and_idle_timer_bases() is
not the best name.
Maybe, it is total irrelevant: Since local and global timer information is
required, the original get_next_timer_interrupt() does not return directly
the next timer interrupt. This was introduced already in patch "timer:
Retrieve next expiry of pinned/non-pinned timers seperately". So it's no
longer possible to write:
next_timer = get_next_timer_interrupt()
When having a function "get_something()" I would expect the information is
returned directly. Perhaps just a thing that I would expect... the new
get_next_timer_interrupt() returns directly the next timer interrupt.
Thanks,
Anna-Maria
Powered by blists - more mailing lists