Skip to content

cpufreq_cooling: Get effective CPU utilization from scheduler

Viresh Kumar linux-pm lkml 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest3 patches 2 repliesIn review
  2. v43 patches 11 repliesSuperseded
  3. v32 patches 10 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v22 patches9 repliesSuperseded
v12 patches29 repliesSuperseded

Changes in v5 from the cover letter

- Don't export enum cpu_util_type and don't pass it as argument to sched_cpu_util().
- Fixed a build issue with !CONFIG_THERMAL_GOV_POWER_ALLOCATOR by moving {allocate|free}_idle_time() out of CONFIG_THERMAL_GOV_POWER_ALLOCATOR in patch 3/3.
- Applied Acks from Rafael.

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3sched/core: Move schedutil_cpu_util() to core.ckernel/sched/core.c kernel/sched/cpufreq_schedutil.c kernel/sched/sched.h+109 -1170 replies
2/3sched/core: Rename schedutil_cpu_util() and allow rest of the kernel to use itinclude/linux/sched.h kernel/sched/core.c kernel/sched/cpufreq_schedutil.c +2 more+22 -110 replies
3/3thermal: cpufreq_cooling: Reuse sched_cpu_util() for SMP platformsdrivers/thermal/cpufreq_cooling.c+55 -140 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchRafael J. WysockiLukasz Luba
1/3A-b
2/3A-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [PATCH V5 0/3] cpufreq_cooling: Get effective CPU utilization from scheduler

Hi,

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 logs of the patches.

V4->V5:
- Don't export enum cpu_util_type and don't pass it as argument to sched_cpu_util().
- Fixed a build issue with !CONFIG_THERMAL_GOV_POWER_ALLOCATOR by moving {allocate|free}_idle_time() out of CONFIG_THERMAL_GOV_POWER_ALLOCATOR in patch 3/3.
- Applied Acks from Rafael.

V3->V4:
- 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.

V2->V3:
- 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

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 |  69 ++++++++++++++----
 include/linux/sched.h             |   5 ++
 kernel/sched/core.c               | 114 ++++++++++++++++++++++++++++++
 kernel/sched/cpufreq_schedutil.c  | 108 +---------------------------
 kernel/sched/fair.c               |   6 +-
 kernel/sched/sched.h              |  22 ++----
 6 files changed, 184 insertions(+), 140 deletions(-)

base-commit: 3650b228f83adda7e5ee532e2b90429c03f7b9ec

Signature · 1 line
2.25.0.rc1.19.g042ed3e048af