Skip to content

cpufreq: Use QoS layer to manage freq-constraints

Viresh Kumar linux-pm linux-tegra lkml 5 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest7 patches 0 repliesNew
  2. v57 patches 0 repliesSuperseded
  3. v46 patches 0 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v35 patches21 repliesSuperseded
v25 patches10 repliesSuperseded

Changes in v6 from the cover letter

- Fixed compilation issues with !CONFIG_PM case on riscv architecture.

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7PM / QOS: Pass request type to dev_pm_qos_{add|remove}_notifier()Documentation/power/pm_qos_interface.txt drivers/base/power/domain.c drivers/base/power/qos.c +1 more+31 -130 replies
2/7PM / QOS: Rename __dev_pm_qos_read_value() and dev_pm_qos_raw_read_value()drivers/base/power/domain_governor.c drivers/base/power/qos.c drivers/base/power/runtime.c +2 more+16 -110 replies
3/7PM / QOS: Pass request type to dev_pm_qos_read_value()Documentation/power/pm_qos_interface.txt drivers/base/power/domain_governor.c drivers/base/power/qos.c +1 more+27 -100 replies
4/7PM / QoS: Add support for MIN/MAX frequency constraintsdrivers/base/power/qos.c include/linux/pm_qos.h+109 -140 replies
5/7cpufreq: Register notifiers with the PM QoS frameworkdrivers/cpufreq/cpufreq.c include/linux/cpufreq.h+109 -2912 replies
6/7cpufreq: intel_pstate: Reuse refresh_frequency_limits()drivers/cpufreq/cpufreq.c drivers/cpufreq/intel_pstate.c include/linux/cpufreq.h+4 -70 replies
7/7cpufreq: Add QoS requests for userspace constraintsdrivers/cpufreq/cpufreq.c include/linux/cpufreq.h+46 -492 replies

Reviews trailers per patch

5 of 7 patches have a Reviewed-by or Acked-by.

PatchMatthias KaehlckeUlf Hansson
1/7R-b R-b
2/7
3/7R-b R-b
4/7R-b R-b
5/7R-b R-b R-b R-b
6/7
7/7R-b R-b R-b R-b

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

Read the v6 thread

Cover letter [PATCH V6 0/7] cpufreq: Use QoS layer to manage freq-constraints

Hello,

Sorry about another version after another round of embarrassment over compilation issues. The same patches have gone through pm/linux-next and linux-next/master earlier, not sure why the current issues never came up before. Anyway, they were stupid coding mistakes :(

I have pushed these patches again for the build bot to test, which should finish before these get merged in PM tree now.

This patchset attempts to manage CPU frequency constraints using the PM QoS framework. It only does the basic stuff right now and moves the userspace constraints to use the QoS infrastructure.

Todo:
- Migrate all users to the QoS framework and get rid of cpufreq specific notifiers.
- Make PM QoS learn about the relation of CPUs in a policy, so a single list of constraints is managed for all of them instead of per-cpu constraints.

V5->V6:
- Fixed compilation issues with !CONFIG_PM case on riscv architecture.

V4->V5:
- A new patch added, 6/7.

V3->V4:
- Few commit logs updated as suggested during reviews.
- Separate commit (2/6) to create resume-latency specific routines
- Reused earlier work ("update") for notifiers as well.
- Kept Reviewed-by tags as is as the patches normally got better only. Please take them back if you find any issues.

V2->V3:
- Add a comment in cpufreq.c as suggested by Qais.
- Rebased on latest pm/linux-next.

V1->V2:
- The previous version introduced a completely new framework, this one moves to PM QoS instead.
- Lots of changes because of this.

--
viresh

Viresh Kumar (7):
PM / QOS: Pass request type to dev_pm_qos_{add|remove}_notifier() PM / QOS: Rename __dev_pm_qos_read_value() and

    dev_pm_qos_raw_read_value()

PM / QOS: Pass request type to dev_pm_qos_read_value() PM / QoS: Add support for MIN/MAX frequency constraints
cpufreq: Register notifiers with the PM QoS framework
cpufreq: intel_pstate: Reuse refresh_frequency_limits()
cpufreq: Add QoS requests for userspace constraints

 Documentation/power/pm_qos_interface.txt |  12 +-
 drivers/base/power/domain.c              |   8 +-
 drivers/base/power/domain_governor.c     |   4 +-
 drivers/base/power/qos.c                 | 135 +++++++++++++--
 drivers/base/power/runtime.c             |   2 +-
 drivers/cpufreq/cpufreq.c                | 201 ++++++++++++++++-------
 drivers/cpufreq/intel_pstate.c           |   7 +-
 drivers/cpuidle/governor.c               |   2 +-
 include/linux/cpufreq.h                  |  12 +-
 include/linux/pm_qos.h                   |  48 ++++--
 10 files changed, 320 insertions(+), 111 deletions(-)
Signature · 1 line
2.21.0.rc0.269.g1a574e7a288b