[v9,01/32] tick-sched: Fix function names in comments

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

Commit Message

Anna-Maria Behnsen Dec. 1, 2023, 9:26 a.m. UTC
  When referencing functions in comments, it might be helpful to use full
function names (including the prefix) to be able to find it when grepping.

Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
---
v9: New cleanup patch
---
 kernel/time/tick-sched.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
  

Comments

Frederic Weisbecker Dec. 20, 2023, 1:09 p.m. UTC | #1
Le Fri, Dec 01, 2023 at 10:26:23AM +0100, Anna-Maria Behnsen a écrit :
> When referencing functions in comments, it might be helpful to use full
> function names (including the prefix) to be able to find it when grepping.
> 
> Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>

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

Just a small detail that be addressed as a further patch (or edited
while applying).

> ---
> v9: New cleanup patch
> ---
>  kernel/time/tick-sched.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
> index be77b021e5d6..5c28cc80fd25 100644
> --- a/kernel/time/tick-sched.c
> +++ b/kernel/time/tick-sched.c
> @@ -920,11 +920,11 @@ static void tick_nohz_stop_tick(struct tick_sched *ts, int cpu)
>  	}
>  
>  	/*
> -	 * nohz_stop_sched_tick() can be called several times before
> -	 * nohz_restart_sched_tick() is called. This happens when
> -	 * interrupts arrive which do not cause a reschedule. In the
> -	 * first call we save the current tick time, so we can restart
> -	 * the scheduler tick in nohz_restart_sched_tick().
> +	 * tick_nohz_stop_sched_tick() can be called several times before

s/tick_nohz_stop_sched_tick/tick_nohz_stop_tick

Because in the case of nohz_full it's indeed true. But idle behaves the same
even though it uses another function (tick_nohz_idle_stop_tick()).

More generally tick_nohz_stop_tick() covers both idle and nohz_full case
and behaves as described.

I guess at some point we should rename tick_nohz_stop_sched_tick() to
tick_nohz_full_stop_tick() to avoid such confusion.

Thanks.

> +	 * tick_nohz_restart_sched_tick() is called. This happens when
> +	 * interrupts arrive which do not cause a reschedule. In the first call
> +	 * we save the current tick time, so we can restart the scheduler tick
> +	 * in tick_nohz_restart_sched_tick().
>  	 */
>  	if (!ts->tick_stopped) {
>  		calc_load_nohz_start();
> -- 
> 2.39.2
>
  

Patch

diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index be77b021e5d6..5c28cc80fd25 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -920,11 +920,11 @@  static void tick_nohz_stop_tick(struct tick_sched *ts, int cpu)
 	}
 
 	/*
-	 * nohz_stop_sched_tick() can be called several times before
-	 * nohz_restart_sched_tick() is called. This happens when
-	 * interrupts arrive which do not cause a reschedule. In the
-	 * first call we save the current tick time, so we can restart
-	 * the scheduler tick in nohz_restart_sched_tick().
+	 * tick_nohz_stop_sched_tick() can be called several times before
+	 * tick_nohz_restart_sched_tick() is called. This happens when
+	 * interrupts arrive which do not cause a reschedule. In the first call
+	 * we save the current tick time, so we can restart the scheduler tick
+	 * in tick_nohz_restart_sched_tick().
 	 */
 	if (!ts->tick_stopped) {
 		calc_load_nohz_start();