powercap: Introduce generic hierarchy helpers and selftests
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 8 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | powercap: Add generic zone hierarchy creation helpersdrivers/ include/ | +326 | 0 replies | |
| 2/2 | selftests/powercap: Add powercap hierarchy creation API teststools/ tools/ tools/ +2 more | +386 | 0 replies |
Reviews trailers per patch
None of the 2 patches has a Reviewed-by or Acked-by.
| Patch | Manaf Meethalavalappu Pallikunhi |
|---|---|
| Series | T-b |
| 1/2 | |
| 2/2 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/2] powercap: Introduce generic hierarchy helpers and selftests
Powercap controllers frequently expose a hierarchy of power zones (for example package, clusters and CPUs). Until now, each driver had to implement its own hierarchy traversal, parent lookup, error handling and teardown logic.
This series introduces a generic hierarchy description and helper functions allowing a controller to instantiate and destroy an entire powercap hierarchy from a static description. The framework takes care of duplicating the hierarchy description, rebasing parent pointers, creating zones in dependency order and performing the appropriate rollback and cleanup on errors.
The series also adds a kselftest exercising the new API by creating a synthetic hierarchy, validating the exported sysfs hierarchy and attributes, and ensuring that all resources are correctly released when the hierarchy is destroyed.
The patches are organized as follows:
1. powercap: Add generic zone hierarchy creation helpers
2. selftests/powercap: Add powercap hierarchy creation API tests
The API was primarily motivated by the recently posted SPEL series and also provides a migration path for DTPM to use the same generic infrastructure instead of maintaining its own hierarchy handling.
Daniel Lezcano (2):
powercap: Add generic zone hierarchy creation helpers selftests/powercap: Add powercap hierarchy creation API tests
--
2.50.1
Daniel Lezcano (2):
powercap: Add generic zone hierarchy creation helpers selftests/powercap: Add powercap hierarchy creation API tests
drivers/powercap/powercap_sys.c | 148 +++++++++++ include/linux/powercap.h | 178 +++++++++++++ tools/testing/selftests/Makefile | 1 + tools/testing/selftests/powercap/Kbuild | 3 + tools/testing/selftests/powercap/Makefile | 17 ++ .../selftests/powercap/powercap_hierarchy.c | 247 ++++++++++++++++++ .../selftests/powercap/powercap_hierarchy.sh | 118 +++++++++ 7 files changed, 712 insertions(+) create mode 100644 tools/testing/selftests/powercap/Kbuild create mode 100644 tools/testing/selftests/powercap/Makefile create mode 100644 tools/testing/selftests/powercap/powercap_hierarchy.c create mode 100755 tools/testing/selftests/powercap/powercap_hierarchy.sh
Signature · 1 line
2.53.0