kernel: ems/ego: cap iowait boost by uclamp_max

Which is a backport of upstream fix:

d37aee9018e6 ("sched/uclamp: Fix iowait boost escaping uclamp restriction")

Bug: 261695814
Signed-off-by: Qais Yousef <qyousef@google.com>
Change-Id: Ibe8175edb9dea35e325f1a6f4306885ab8b6b28a
[Flopster101: Adapted to Exynos energy_aware governor]
Signed-off-by: Nahuel Gómez <nahuelgomez329@gmail.com>
This commit is contained in:
Qais Yousef 2023-10-29 19:44:52 +01:00 committed by Ksawlii
parent 484f198a6b
commit 17cc903017

View file

@ -882,6 +882,8 @@ static unsigned long ego_iowait_apply(struct ego_cpu *egc, u64 time,
* into the same scale so we can compare.
*/
boost = (egc->iowait_boost * max) >> SCHED_CAPACITY_SHIFT;
boost = max(boost, util);
boost = uclamp_rq_util_with(cpu_rq(egc->cpu), boost, NULL);
return boost;
}