Re: [PATCH] sched: Fix typo of head comment of ___update_load_avg

From: Vincent Guittot
Date: Mon Oct 07 2024 - 02:42:34 EST


On Sat, 5 Oct 2024 at 02:53, Zhouyi Zhou <zhouzhouyi@xxxxxxxxx> wrote:
>
> The head comment of ___update_load_avg illustrates the principle of
> PELT divider. "unwanted oscillation in the range [1002..1024[" should
> be "unwanted oscillation in the range [1002..1024]".
>
> Fix above typo.

This is not a typo as 1024 is an excluded endpoint of the interval.
Some may use [1002..1024) but both [1002..1024[ and [1002..1024) can
be used

>
> Signed-off-by: Zhouyi Zhou <zhouzhouyi@xxxxxxxxx>
> ---
> kernel/sched/pelt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/sched/pelt.c b/kernel/sched/pelt.c
> index a9c65d97b3ca..565171fb2138 100644
> --- a/kernel/sched/pelt.c
> +++ b/kernel/sched/pelt.c
> @@ -233,7 +233,7 @@ ___update_load_sum(u64 now, struct sched_avg *sa,
> * When syncing *_avg with *_sum, we must take into account the current
> * position in the PELT segment otherwise the remaining part of the segment
> * will be considered as idle time whereas it's not yet elapsed and this will
> - * generate unwanted oscillation in the range [1002..1024[.
> + * generate unwanted oscillation in the range [1002..1024].
> *
> * The max value of *_sum varies with the position in the time segment and is
> * equals to :
> --
> 2.34.1
>