[v5,02/18] timer: Add comment to get_next_timer_interrupt() description

Message ID 20230301141744.16063-3-anna-maria@linutronix.de
State New
Headers
Series timer: Move from a push remote at enqueue to a pull at expiry model |

Commit Message

Anna-Maria Behnsen March 1, 2023, 2:17 p.m. UTC
  get_next_timer_interrupt() does more than simply getting the next timer
interrupt. The timer bases are forwarded and also marked as idle whenever
possible.

To get not confused, add a comment to function description.

Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
---
v5: New patch, which adds only a comment to get_next_timer_interrupt()
instead of changing the function name
---
 kernel/time/timer.c | 4 ++++
 1 file changed, 4 insertions(+)
  

Comments

Frederic Weisbecker April 11, 2023, 9:36 a.m. UTC | #1
On Wed, Mar 01, 2023 at 03:17:28PM +0100, Anna-Maria Behnsen wrote:
> get_next_timer_interrupt() does more than simply getting the next timer
> interrupt. The timer bases are forwarded and also marked as idle whenever
> possible.
> 
> To get not confused, add a comment to function description.
> 
> Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
> ---
> v5: New patch, which adds only a comment to get_next_timer_interrupt()
> instead of changing the function name
> ---
>  kernel/time/timer.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/kernel/time/timer.c b/kernel/time/timer.c
> index 63a8ce7177dd..ffb94bc3852f 100644
> --- a/kernel/time/timer.c
> +++ b/kernel/time/timer.c
> @@ -1915,6 +1915,10 @@ static u64 cmp_next_hrtimer_event(u64 basem, u64 expires)
>   * @basej:	base time jiffies
>   * @basem:	base time clock monotonic
>   *
> + * If required, base->clk is forwarded and base is also marked as
> + * idle. Idle handling of timer bases is allowed only to be done by CPU
> + * itself.

Idle marking you mean? Because idle handling can be done remotely after
this patchset.

Thanks.

> + *
>   * Returns the tick aligned clock monotonic time of the next pending
>   * timer or KTIME_MAX if no timer is pending.
>   */
> -- 
> 2.30.2
>
  
Anna-Maria Behnsen April 11, 2023, 4:10 p.m. UTC | #2
On Tue, 11 Apr 2023, Frederic Weisbecker wrote:

> On Wed, Mar 01, 2023 at 03:17:28PM +0100, Anna-Maria Behnsen wrote:
> > get_next_timer_interrupt() does more than simply getting the next timer
> > interrupt. The timer bases are forwarded and also marked as idle whenever
> > possible.
> > 
> > To get not confused, add a comment to function description.
> > 
> > Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
> > ---
> > v5: New patch, which adds only a comment to get_next_timer_interrupt()
> > instead of changing the function name
> > ---
> >  kernel/time/timer.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/kernel/time/timer.c b/kernel/time/timer.c
> > index 63a8ce7177dd..ffb94bc3852f 100644
> > --- a/kernel/time/timer.c
> > +++ b/kernel/time/timer.c
> > @@ -1915,6 +1915,10 @@ static u64 cmp_next_hrtimer_event(u64 basem, u64 expires)
> >   * @basej:	base time jiffies
> >   * @basem:	base time clock monotonic
> >   *
> > + * If required, base->clk is forwarded and base is also marked as
> > + * idle. Idle handling of timer bases is allowed only to be done by CPU
> > + * itself.
> 
> Idle marking you mean? Because idle handling can be done remotely after
> this patchset.
> 

Jupp, will change idle handling to "idle marking".

Thanks,

	Anna-Maria
  
Frederic Weisbecker April 12, 2023, 11:29 a.m. UTC | #3
Le Tue, Apr 11, 2023 at 06:10:25PM +0200, Anna-Maria Behnsen a écrit :
> On Tue, 11 Apr 2023, Frederic Weisbecker wrote:
> 
> > On Wed, Mar 01, 2023 at 03:17:28PM +0100, Anna-Maria Behnsen wrote:
> > > get_next_timer_interrupt() does more than simply getting the next timer
> > > interrupt. The timer bases are forwarded and also marked as idle whenever
> > > possible.
> > > 
> > > To get not confused, add a comment to function description.
> > > 
> > > Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
> > > ---
> > > v5: New patch, which adds only a comment to get_next_timer_interrupt()
> > > instead of changing the function name
> > > ---
> > >  kernel/time/timer.c | 4 ++++
> > >  1 file changed, 4 insertions(+)
> > > 
> > > diff --git a/kernel/time/timer.c b/kernel/time/timer.c
> > > index 63a8ce7177dd..ffb94bc3852f 100644
> > > --- a/kernel/time/timer.c
> > > +++ b/kernel/time/timer.c
> > > @@ -1915,6 +1915,10 @@ static u64 cmp_next_hrtimer_event(u64 basem, u64 expires)
> > >   * @basej:	base time jiffies
> > >   * @basem:	base time clock monotonic
> > >   *
> > > + * If required, base->clk is forwarded and base is also marked as
> > > + * idle. Idle handling of timer bases is allowed only to be done by CPU
> > > + * itself.
> > 
> > Idle marking you mean? Because idle handling can be done remotely after
> > this patchset.
> > 
> 
> Jupp, will change idle handling to "idle marking".

Thanks and then please add:

Reviewed-by: Frederic Weisbecker <frederic@kernel.org>

(Trying to mark patches I don't need to review again on the next take :-)
  

Patch

diff --git a/kernel/time/timer.c b/kernel/time/timer.c
index 63a8ce7177dd..ffb94bc3852f 100644
--- a/kernel/time/timer.c
+++ b/kernel/time/timer.c
@@ -1915,6 +1915,10 @@  static u64 cmp_next_hrtimer_event(u64 basem, u64 expires)
  * @basej:	base time jiffies
  * @basem:	base time clock monotonic
  *
+ * If required, base->clk is forwarded and base is also marked as
+ * idle. Idle handling of timer bases is allowed only to be done by CPU
+ * itself.
+ *
  * Returns the tick aligned clock monotonic time of the next pending
  * timer or KTIME_MAX if no timer is pending.
  */