[V4,0/3] cpufreq_cooling: Get effective CPU utilization from scheduler

Message ID cover.1606198885.git.viresh.kumar@linaro.org
Headers show
  • cpufreq_cooling: Get effective CPU utilization from scheduler
Related show


Viresh Kumar Nov. 24, 2020, 6:26 a.m.

This patchset makes the cpufreq_cooling driver reuse the CPU utilization
metric provided by the scheduler instead of depending on idle and busy
times of a CPU, which aren't that accurate to measure the busyness of a
CPU for the next cycle. More details can be seen in the commit log of
patch 2/2.

- Broke the first patch into two parts and used effective_cpu_util() in
  schedutil (Rafael).

- Removed comment about idle-injection in last patch based on feedback
  from Lukasz and added hi Reviewed-by tag.

- Put the scheduler helpers within ifdef CONFIG_SMP.
- Keep both SMP and !SMP implementations in the cpufreq_cooling driver.
- Improved commit log with testing related information.


Viresh Kumar (3):
  sched/core: Move schedutil_cpu_util() to core.c
  sched/core: Rename schedutil_cpu_util() and allow rest of the kernel
    to use it
  thermal: cpufreq_cooling: Reuse sched_cpu_util() for SMP platforms

 drivers/thermal/cpufreq_cooling.c |  68 ++++++++++++++----
 include/linux/sched.h             |  21 ++++++
 kernel/sched/core.c               | 115 ++++++++++++++++++++++++++++++
 kernel/sched/cpufreq_schedutil.c  | 108 +---------------------------
 kernel/sched/fair.c               |   6 +-
 kernel/sched/sched.h              |  31 +-------
 6 files changed, 197 insertions(+), 152 deletions(-)

base-commit: 3650b228f83adda7e5ee532e2b90429c03f7b9ec