ANDROID: sched/tune: Move SchedTune cpu API into UtilClamp wrappers
The a SchedTune CPU boosting API is currently used from sugov_get_util() to get the boosted utilization and to pass it into schedutil_freq_util(). When UtilClamp is in use instead we call schedutil_freq_util() by passing in just the aggregated CFS+RT utilization and the clamping is done internally only on FREQUENCY_UTIL calls. This asymmetry is not required moreover, schedutil code is polluted by non-mainline SchedTune code. Wrap SchedTune API call related to cpu utilization boosting with a more generic and mainlinish UtilClamp call: - uclamp_util(cpu, util) <= boosted_cpu_util(cpu) This new API is already used in schedutil_freq_util() to clamp the aggregated RT+CFS utilization on FREQUENCY_UTIL calls. Move the cpu boosting into uclamp_util so that we remove any SchedTune specific bit from kernel/sched/cpufreq_schedutil.c. Get rid of the no more required boosted_cpu_util(cpu) method and replace it with a stune_util(cpu, util) which signature is better aligned with its uclamp_util(cpu, util) wrapping method. Signed-off-by:Patrick Bellasi <patrick.bellasi@arm.com> [ Since we are at that, fix compilation warning due to capacity_orig_of() being "defined by not used" generated by rt and deadline compilation units. ] Signed-off-by:
Patrick Bellasi <patrick.bellasi@arm.com> Signed-off-by:
Qais Yousef <qais.yousef@arm.com>
Loading
Please register or sign in to comment