diff options
author | Dietmar Eggemann <dietmar.eggemann@arm.com> | 2023-05-15 13:57:34 +0200 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2023-06-05 21:13:43 +0200 |
commit | 3eb6d6ececca2fd566d717b37ab467c246f66be7 (patch) | |
tree | b546c0bf79b248cbdca1b2e613d36c112df77291 /kernel/sched/cpufreq_schedutil.c | |
parent | e6a15fa9ea8372ad4db973191233f743ae1081d5 (diff) |
sched/fair: Refactor CPU utilization functions
There is a lot of code duplication in cpu_util_next() & cpu_util_cfs().
Remove this by allowing cpu_util_next() to be called with p = NULL.
Rename cpu_util_next() to cpu_util() since the '_next' suffix is no
longer necessary to distinct cpu utilization related functions.
Implement cpu_util_cfs(cpu) as cpu_util(cpu, p = NULL, -1).
This will allow to code future related cpu util changes only in one
place, namely in cpu_util().
Signed-off-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Vincent Guittot <vincent.guittot@linaro.org>
Link: https://lore.kernel.org/r/20230515115735.296329-2-dietmar.eggemann@arm.com
Diffstat (limited to 'kernel/sched/cpufreq_schedutil.c')
0 files changed, 0 insertions, 0 deletions