Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 63d1657 ("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: 63d1657 ANDROID: sched/rt: fix the problem that rt_rq's util is always zero. Reported-by: Ke Wang <[email protected]> Signed-off-by: Patrick Bellasi <[email protected]>
- Loading branch information