schedutil : 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
This commit is contained in:
Qais Yousef 2023-10-29 19:44:52 +01:00 committed by Ksawlii
parent ca3d31ea66
commit 971267e87b

View file

@ -421,7 +421,10 @@ static unsigned long sugov_iowait_apply(struct sugov_cpu *sg_cpu, u64 time,
* into the same scale so we can compare.
*/
boost = (sg_cpu->iowait_boost * max) >> SCHED_CAPACITY_SHIFT;
return max(boost, util);
boost = max(boost, util);
boost = uclamp_rq_util_with(cpu_rq(sg_cpu->cpu), boost, NULL);
return boost;
}
#ifdef CONFIG_NO_HZ_COMMON