Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 07d1bac4 authored by Patrick Bellasi's avatar Patrick Bellasi Committed by Todd Kjos
Browse files

ANDROID: sched/fair: Don't double account RT util in boosted_cpu_util()



WALT is a cross-class utilization tracking signal which accounts not
only for FAIR tasks utilization but also for that of RT and DL tasks.
PELT instead provides per-class utilization signals, which is why in
boosted_cpu_util() we currently aggregated the FAIR utilization with
that generated by RT tasks.

However, the aggregation provided in boosted_cpu_util() is not correct
when WALT is in use, since we end up double accounting RT tasks
generated utilization. Even worst, we add a PELT signal to a WALT
signal.

Since:
   commit 63d1657d ("ANDROID: sched/rt: fix the problem that rt_rq's util is always zero.")
the rt rq signal is correctly updated. However, that fix missed to
detect and fix the unconditional aggregation of the PELT signal when
WALT is in use.

Fix this by ensuring to aggregate RT and FAIR utilization only when PELT
is in use. Do that by refactoring boosted_cpu_util() to get just one
"properly aggregated" signal and by making sure that the correct
aggregation is preformed in cpu_util_freq(), which already provides
WALT-PELT switching logic.

Change-Id: Ifd738102e9102b210b7be2c2565ab796e3b57061
Fixes: 63d1657d ANDROID: sched/rt: fix the problem that rt_rq's util is always zero.
Reported-by: default avatarKe Wang <ke.wang@spreadtrum.com>
Signed-off-by: default avatarPatrick Bellasi <patrick.bellasi@arm.com>
parent 6bdf39bb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment