sched/pelt: Fix bracket typo
PATCH 1/1 sched/pelt: Fix bracket typo
The second bracket describing the range is inverted, this patch will fix it.
--- 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.35.1
Quoted 13 lines · Steven Lung
The second bracket describing the range is inverted, this patch will fix it.
Signed-off-by Steven Lung <[email protected]>--- kernel/sched/pelt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)kernel/sched/pelt.c +0
-0
kernel/sched/pelt.c ___update_load_sum(u64 now, struct sched_avg *sa, · line 236
Quoted 4 lines
kernel/sched/pelt.c +0
-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[.
Is the above the same as range [1002..1024).
? I.e. 1002-1023 inclusive (or 1024 excluded)?
Quoted 4 lines
kernel/sched/pelt.c +1
-0+* 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
~Randy
Quoted 25 lines · Randy Dunlap
Quoted 13 lines · Steven Lung
The second bracket describing the range is inverted, this patch will fix it.
Signed-off-by Steven Lung <[email protected]>--- kernel/sched/pelt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)kernel/sched/pelt.c +0
-0kernel/sched/pelt.c ___update_load_sum(u64 now, struct sched_avg *sa, · line 236
Quoted 4 lines
kernel/sched/pelt.c +0
-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[. Is the above the same as range [1002..1024).
? I.e. 1002-1023 inclusive (or 1024 excluded)?
Quoted 7 lines
kernel/sched/pelt.c ___update_load_sum(u64 now, struct sched_avg *sa, · line 239
Quoted 4 lines
kernel/sched/pelt.c +1
-0+* 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 : --
~Randy
In the patch that the author submitted[1] for this comment, he mentioned that the value 1024 can be obtained.
So I think we should use brackets instead of parenthesis.
[1]: https://lore.kernel.org/all/[email protected]/T/#u
--
Steven
Peter Zijlstra
maintainerQuoted 26 lines · 龍帆軒
Quoted 12 lines · Randy Dunlap
Quoted 8 lines · Steven Lung
The second bracket describing the range is inverted, this patch will fix it.
Signed-off-by Steven Lung <[email protected]>--- kernel/sched/pelt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Quoted 12 lines
kernel/sched/pelt.c ___update_load_sum(u64 now, struct sched_avg *sa, · line 236
Quoted 9 lines
kernel/sched/pelt.c +0
-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[. Is the above the same as range [1002..1024).
? I.e. 1002-1023 inclusive (or 1024 excluded)?
Quoted 3 lines
In the patch that the author submitted[1] for this comment, he mentioned that the value 1024 can be obtained.
So I think we should use brackets instead of parenthesis.
Yeah, IIRC the value is fundamentally [0,1] (*scale) there. Therefore the patch as proposed makes sense to me.
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 32 lines · 龍帆軒
Quoted 32 lines
Randy Dunlap <[email protected] <mailto:[email protected]>> 於 2022年6月8日 下午11:33 寫道:
Quoted 13 lines · Steven Lung
The second bracket describing the range is inverted, this patch will fix it.
Signed-off-by Steven Lung <[email protected] <mailto:[email protected]>>---
kernel/sched/pelt.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)kernel/sched/pelt.c +0
-0kernel/sched/pelt.c ___update_load_sum(u64 now, struct sched_avg *sa, · line 236
Quoted 4 lines
kernel/sched/pelt.c +0
-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[.Is the above the same as range [1002..1024). ? I.e. 1002-1023 inclusive (or 1024 excluded)?
Quoted 4 lines
kernel/sched/pelt.c +1
-0+ * 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 :
Quoted 7 lines
Quoted 2 lines
Signature · 1 line
~RandyIn the patch that the author submitted[1] for this comment, he mentioned that the value 1024 can be obtained. So I think we should use brackets instead of parenthesis.
[1]: https://lore.kernel.org/all/[email protected]/T/#u <https://lore.kernel.org/all/[email protected]/T/#u>
OK, thanks for the link.
Signature · 1 line
~Randy
Vincent Guittot
maintainerQuoted 27 lines · 龍帆軒
Randy Dunlap <[email protected]> 於 2022年6月8日 下午11:33 寫道:
On 6/8/22 08:00, Steven Lung wrote:
The second bracket describing the range is inverted, this patch will fix it.
Signed-off-by Steven Lung <[email protected]>---
kernel/sched/pelt.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)kernel/sched/pelt.c +0
-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[.
Quoted 2 lines
Is the above the same as range [1002..1024).
? I.e. 1002-1023 inclusive (or 1024 excluded)?
yes, 1024 was excluded from the range because we reached 1024 when period_contrib == 1024 but when period_contrib == 1024 we decayed and period_contrib becomes 0 and the load_avg went down to 1002.
Before the changes, the load_avg for default weight was 1024*(LOAD_AVG_MAX-1024+period_contrib)/LOAD_AVG_MAX
if period_contrib == 0 ie the beg of the window we've got a load_avg of 1002 if period_contrib == 1023 ie the end of the window we've got a load of int(1023.97)==1023
In French, we use [1002..1024[ but english version is [1002..1024)
Quoted 19 lines
+ * generate unwanted oscillation in the range [1002..1024].
*
* The max value of*_sumvaries with the position in the time segment and is
* equals to :--
~RandyIn the patch that the author submitted[1] for this comment, he mentioned that the value 1024 can be obtained. So I think we should use brackets instead of parenthesis.
[1]: https://lore.kernel.org/all/[email protected]/T/#u
--
Steven
Quoted 35 lines · Vincent Guittot
Quoted 27 lines · 龍帆軒
Randy Dunlap <[email protected]> 於 2022年6月8日 下午11:33 寫道:
On 6/8/22 08:00, Steven Lung wrote:
The second bracket describing the range is inverted, this patch will fix it.
Signed-off-by Steven Lung <[email protected]>---
kernel/sched/pelt.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)kernel/sched/pelt.c +0
-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[. Quoted 2 lines
Is the above the same as range [1002..1024).
? I.e. 1002-1023 inclusive (or 1024 excluded)?yes, 1024 was excluded from the range because we reached 1024 when
period_contrib== 1024 but whenperiod_contrib== 1024 we decayed andperiod_contribbecomes 0 and theload_avgwent down to 1002.
Quoted 7 lines
Before the changes, the
load_avgfor default weight was 1024*(LOAD_AVG_MAX-1024+period_contrib)/LOAD_AVG_MAX
ifperiod_contrib== 0 ie the beg of the window we've got aload_avgof 1002 ifperiod_contrib== 1023 ie the end of the window we've got a load of int(1023.97)==1023In French, we use [1002..1024[ but english version is [1002..1024)
Seems this patch should not be applied, thank Vincent for the explanation.
Quoted 20 lines
Quoted 20 lines
+ * generate unwanted oscillation in the range [1002..1024].
*
* The max value of*_sumvaries with the position in the time segment and is
* equals to :--
~RandyIn the patch that the author submitted[1] for this comment, he mentioned that the value 1024 can be obtained. So I think we should use brackets instead of parenthesis.
[1]: https://lore.kernel.org/all/[email protected]/T/#u
--
Steven