All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sched: Fix typo of head comment of ___update_load_avg
@ 2024-10-05  0:52 Zhouyi Zhou
  2024-10-07  6:42 ` Vincent Guittot
  0 siblings, 1 reply; 4+ messages in thread
From: Zhouyi Zhou @ 2024-10-05  0:52 UTC (permalink / raw)
  To: linux-kernel, mingo, peterz, juri.lelli, vincent.guittot,
	dietmar.eggemann, rostedt, bsegall, mgorman, bristot, vschneid
  Cc: Zhouyi Zhou

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.

Signed-off-by: Zhouyi Zhou <zhouzhouyi@gmail.com>
---
 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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] sched: Fix typo of head comment of ___update_load_avg
  2024-10-05  0:52 [PATCH] sched: Fix typo of head comment of ___update_load_avg Zhouyi Zhou
@ 2024-10-07  6:42 ` Vincent Guittot
  2024-10-07  8:10   ` Peter Zijlstra
  0 siblings, 1 reply; 4+ messages in thread
From: Vincent Guittot @ 2024-10-07  6:42 UTC (permalink / raw)
  To: Zhouyi Zhou
  Cc: linux-kernel, mingo, peterz, juri.lelli, dietmar.eggemann,
	rostedt, bsegall, mgorman, bristot, vschneid

On Sat, 5 Oct 2024 at 02:53, Zhouyi Zhou <zhouzhouyi@gmail.com> 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@gmail.com>
> ---
>  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
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] sched: Fix typo of head comment of ___update_load_avg
  2024-10-07  6:42 ` Vincent Guittot
@ 2024-10-07  8:10   ` Peter Zijlstra
  2024-10-07  8:15     ` Vincent Guittot
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Zijlstra @ 2024-10-07  8:10 UTC (permalink / raw)
  To: Vincent Guittot
  Cc: Zhouyi Zhou, linux-kernel, mingo, juri.lelli, dietmar.eggemann,
	rostedt, bsegall, mgorman, bristot, vschneid

On Mon, Oct 07, 2024 at 08:42:14AM +0200, Vincent Guittot wrote:
> On Sat, 5 Oct 2024 at 02:53, Zhouyi Zhou <zhouzhouyi@gmail.com> 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

Because I'm weird, I googled this, and the [a,b[ notation is from
Bourbaki and hence popular in the French speaking world :-)

We don't have many intervals specified in comments and hence we can't
make the inconsistent style argument either.

So yeah, let it be.. at best its a trigger to get people to better look
at the code. At worst its one of those triggers that people keep trying
to mindlessly 'fix', like my use of borken :-)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] sched: Fix typo of head comment of ___update_load_avg
  2024-10-07  8:10   ` Peter Zijlstra
@ 2024-10-07  8:15     ` Vincent Guittot
  0 siblings, 0 replies; 4+ messages in thread
From: Vincent Guittot @ 2024-10-07  8:15 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: Zhouyi Zhou, linux-kernel, mingo, juri.lelli, dietmar.eggemann,
	rostedt, bsegall, mgorman, bristot, vschneid

On Mon, 7 Oct 2024 at 10:10, Peter Zijlstra <peterz@infradead.org> wrote:
>
> On Mon, Oct 07, 2024 at 08:42:14AM +0200, Vincent Guittot wrote:
> > On Sat, 5 Oct 2024 at 02:53, Zhouyi Zhou <zhouzhouyi@gmail.com> 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
>
> Because I'm weird, I googled this, and the [a,b[ notation is from
> Bourbaki and hence popular in the French speaking world :-)

Yeah, I firstly thought reversed square bracket was only french and
parenthesis was the international one but the International standard
ISO 31-11 describes both in fact

>
> We don't have many intervals specified in comments and hence we can't
> make the inconsistent style argument either.
>
> So yeah, let it be.. at best its a trigger to get people to better look
> at the code. At worst its one of those triggers that people keep trying
> to mindlessly 'fix', like my use of borken :-)

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-10-07  8:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-05  0:52 [PATCH] sched: Fix typo of head comment of ___update_load_avg Zhouyi Zhou
2024-10-07  6:42 ` Vincent Guittot
2024-10-07  8:10   ` Peter Zijlstra
2024-10-07  8:15     ` Vincent Guittot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.