sched: Fix typo of head comment of ___update_load_avg
PATCH 1/1 sched: Fix typo of head comment of ___update_load_avg
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.
--- kernel/sched/pelt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sched/pelt.c +1 -1
@@ -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 :
Signature · 1 line
2.34.1
Vincent Guittot
maintainerQuoted 6 lines · Zhouyi Zhou
The head comment of
___update_load_avgillustrates 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
Quoted 22 lines
Signed-off-by Zhouyi Zhou <[email protected]>--- kernel/sched/pelt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)kernel/sched/pelt.c +1
-2@@ -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
Peter Zijlstra
maintainerQuoted 11 lines · Vincent Guittot
Quoted 6 lines · Zhouyi Zhou
The head comment of
___update_load_avgillustrates 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 :-)
Vincent Guittot
maintainerQuoted 8 lines · Peter Zijlstra
Quoted 6 lines · Vincent Guittot
Quoted 5 lines · Zhouyi Zhou
The head comment of
___update_load_avgillustrates the principle of PELT divider. "unwanted oscillation in the range [1002..1024[" should be "unwanted oscillation in the range [1002..1024]".
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
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
Quoted 7 lines
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 :-)