Skip to content

Commit 7736ae5

Browse files
vingu-linaroingomolnar
authored andcommitted
sched/fair: Remove SCHED_FEAT(UTIL_EST_FASTUP, true)
sched_feat(UTIL_EST_FASTUP) has been added to easily disable the feature in order to check for possibly related regressions. After 3 years, it has never been used and no regression has been reported. Let's remove it and make fast increase a permanent behavior. Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Tested-by: Lukasz Luba <lukasz.luba@arm.com> Reviewed-by: Lukasz Luba <lukasz.luba@arm.com> Reviewed-by: Dietmar Eggemann <dietmar.eggemann@arm.com> Reviewed-by: Hongyan Xia <hongyan.xia2@arm.com> Reviewed-by: Tang Yizhou <yizhou.tang@shopee.com> Reviewed-by: Yanteng Si <siyanteng@loongson.cn> [for the Chinese translation] Reviewed-by: Alex Shi <alexs@kernel.org> Link: https://lore.kernel.org/r/20231201161652.1241695-2-vincent.guittot@linaro.org
1 parent 1f02300 commit 7736ae5

4 files changed

Lines changed: 9 additions & 14 deletions

File tree

Documentation/scheduler/schedutil.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,17 +90,16 @@ For more detail see:
9090
- Documentation/scheduler/sched-capacity.rst:"1. CPU Capacity + 2. Task utilization"
9191

9292

93-
UTIL_EST / UTIL_EST_FASTUP
94-
==========================
93+
UTIL_EST
94+
========
9595

9696
Because periodic tasks have their averages decayed while they sleep, even
9797
though when running their expected utilization will be the same, they suffer a
9898
(DVFS) ramp-up after they are running again.
9999

100100
To alleviate this (a default enabled option) UTIL_EST drives an Infinite
101101
Impulse Response (IIR) EWMA with the 'running' value on dequeue -- when it is
102-
highest. A further default enabled option UTIL_EST_FASTUP modifies the IIR
103-
filter to instantly increase and only decay on decrease.
102+
highest. UTIL_EST filters to instantly increase and only decay on decrease.
104103

105104
A further runqueue wide sum (of runnable tasks) is maintained of:
106105

Documentation/translations/zh_CN/scheduler/schedutil.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,16 +89,15 @@ r_cpu被定义为当前CPU的最高性能水平与系统中任何其它CPU的最
8989
- Documentation/translations/zh_CN/scheduler/sched-capacity.rst:"1. CPU Capacity + 2. Task utilization"
9090

9191

92-
UTIL_EST / UTIL_EST_FASTUP
93-
==========================
92+
UTIL_EST
93+
========
9494

9595
由于周期性任务的平均数在睡眠时会衰减,而在运行时其预期利用率会和睡眠前相同,
9696
因此它们在再次运行后会面临(DVFS)的上涨。
9797

9898
为了缓解这个问题,(一个默认使能的编译选项)UTIL_EST驱动一个无限脉冲响应
9999
(Infinite Impulse Response,IIR)的EWMA,“运行”值在出队时是最高的。
100-
另一个默认使能的编译选项UTIL_EST_FASTUP修改了IIR滤波器,使其允许立即增加,
101-
仅在利用率下降时衰减。
100+
UTIL_EST滤波使其在遇到更高值时立刻增加,而遇到低值时会缓慢衰减。
102101

103102
进一步,运行队列的(可运行任务的)利用率之和由下式计算:
104103

kernel/sched/fair.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4870,11 +4870,9 @@ static inline void util_est_update(struct cfs_rq *cfs_rq,
48704870
* to smooth utilization decreases.
48714871
*/
48724872
ue.enqueued = task_util(p);
4873-
if (sched_feat(UTIL_EST_FASTUP)) {
4874-
if (ue.ewma < ue.enqueued) {
4875-
ue.ewma = ue.enqueued;
4876-
goto done;
4877-
}
4873+
if (ue.ewma < ue.enqueued) {
4874+
ue.ewma = ue.enqueued;
4875+
goto done;
48784876
}
48794877

48804878
/*

kernel/sched/features.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ SCHED_FEAT(WA_BIAS, true)
8383
* UtilEstimation. Use estimated CPU utilization.
8484
*/
8585
SCHED_FEAT(UTIL_EST, true)
86-
SCHED_FEAT(UTIL_EST_FASTUP, true)
8786

8887
SCHED_FEAT(LATENCY_WARN, false)
8988

0 commit comments

Comments
 (0)