diff options
author | Dietmar Eggemann <[email protected]> | 2023-05-15 13:57:34 +0200 |
---|---|---|
committer | Peter Zijlstra <[email protected]> | 2023-06-05 21:13:43 +0200 |
commit | 3eb6d6ececca2fd566d717b37ab467c246f66be7 (patch) | |
tree | b546c0bf79b248cbdca1b2e613d36c112df77291 /lib/mpi/mpi-sub-ui.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 <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Reviewed-by: Vincent Guittot <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'lib/mpi/mpi-sub-ui.c')
0 files changed, 0 insertions, 0 deletions