Skip to content

powercap/dtpm: Add the DTPM framework

Daniel Lezcano linux-pm lkml 6 versions – Applied

Status from this message: Applied as 5.11-rc material now, sorry for the delay.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest4 patches 6 repliesApplied
  2. v44 patches 4 repliesSuperseded
  3. v34 patches 2 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v2 posting 2/20 of 4 patches0 repliesSuperseded
v2 posting 1/24 patches4 repliesSuperseded
v14 patches35 repliesSuperseded

Changes in v5 from the cover letter

- Fixed typos in documentation
- Added a dtpm NULL pointer check in the dtpm_register() function

Patches in v5 Applied

#Subject and filesSizeRepliesApplied
1/4units: Add Watt unitsinclude/linux/units.h+4 -00 replies
2/4Documentation/powercap/dtpm: Add documentation for dtpmDocumentation/power/index.rst Documentation/power/powercap/dtpm.rst+213 -00 replies
3/4powercap/drivers/dtpm: Add API for dynamic thermal power managementdrivers/powercap/Kconfig drivers/powercap/Makefile drivers/powercap/dtpm.c +2 more+566 -00 replies
4/4powercap/drivers/dtpm: Add CPU energy model based supportdrivers/powercap/Kconfig drivers/powercap/Makefile drivers/powercap/dtpm_cpu.c +2 more+268 -00 replies

Reviews trailers per patch

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

PatchLukasz Luba
1/4R-b
2/4R-b
3/4R-b T-b
4/4R-b T-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/4] powercap/dtpm: Add the DTPM framework

The density of components greatly increased the last decade bringing a numerous number of heating sources which are monitored by more than 20 sensors on recent SoC. The skin temperature, which is the case temperature of the device, must stay below approximately 45°C in order to comply with the legal requirements.

The skin temperature is managed as a whole by an user space daemon, which is catching the current application profile, to allocate a power budget to the different components where the resulting heating effect will comply with the skin temperature constraint.

This technique is called the Dynamic Thermal Power Management.

The Linux kernel does not provide any unified interface to act on the power of the different devices. Currently, the thermal framework is changed to export artificially the performance states of different devices via the cooling device software component with opaque values. This change is done regardless of the in-kernel logic to mitigate the temperature. The user space daemon uses all the available knobs to act on the power limit and those differ from one platform to another.

This series provides a Dynamic Thermal Power Management framework to provide an unified way to act on the power of the devices.

Changelog:
V5:
- Fixed typos in documentation
- Added a dtpm NULL pointer check in the dtpm_register() function
V4:
- Changed fine grain spinlocks by global tree mutex lock
- Dropped tested by tag from Lukasz
- Fixed rollback routine in dtpm_cpu
- Checked freq_qos_request_active() when releasing the dtpm_cpu node
V3:
- Fixed power-limit computation in addition with the hotplugging
- Improved the encapsulation
- Added specific ops for the leaves of the tree
- Simplified API and self-encapsulation
- Fixed documentation and generated it to check the content
V2:
- Fixed indentation
- Fixed typos in comments
- Fixed missing kfree for dtpm_cpu
- Capitalize letters in the Kconfig description
- Reduced name description
- Stringified section name
- Added more debug traces in the code
- Removed duplicate initialization in the dtpm cpu

Daniel Lezcano (4):
units: Add Watt units
Documentation/powercap/dtpm: Add documentation for dtpm powercap/drivers/dtpm: Add API for dynamic thermal power management powercap/drivers/dtpm: Add CPU energy model based support

 Documentation/power/index.rst         |   1 +
 Documentation/power/powercap/dtpm.rst | 212 ++++++++++++
 drivers/powercap/Kconfig              |  13 +
 drivers/powercap/Makefile             |   2 +
 drivers/powercap/dtpm.c               | 473 ++++++++++++++++++++++++++
 drivers/powercap/dtpm_cpu.c           | 257 ++++++++++++++
 include/asm-generic/vmlinux.lds.h     |  11 +
 include/linux/cpuhotplug.h            |   1 +
 include/linux/dtpm.h                  |  77 +++++
 include/linux/units.h                 |   4 +
 10 files changed, 1051 insertions(+)
 create mode 100644 Documentation/power/powercap/dtpm.rst
 create mode 100644 drivers/powercap/dtpm.c
 create mode 100644 drivers/powercap/dtpm_cpu.c
 create mode 100644 include/linux/dtpm.h
Cc Thara Gopinath <[email protected]>
Cc Lina Iyer <[email protected]>
Cc Ram Chandrasekar <[email protected]>
Cc Zhang Rui <[email protected]>
Cc Lukasz Luba <[email protected]>

--
2.17.1