Add RAPL core energy counter support for AMD CPUs
Status from this message: The following commit has been merged into the perf/core branch of tip:
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v7 Latest10 patches 15 repliesApplied
- v610 patches 24 repliesSuperseded
- v59 patches 8 repliesSuperseded
Earlier versions · 4
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v4 | 11 patches | 19 replies | Superseded | |
| v3 | 10 patches | 20 replies | Superseded | |
| v2 | 9 patches | 2 replies | Superseded | |
| v1 | 6 patches | 9 replies | Superseded |
v6 Changes from the cover letter
* Pickup rb, tb tags by Rui and Gautham
* Modify the rapl_pmu_idx variable to unsigned int, and modify the comment in get_rapl_pmu_idx() in patch 3 (Gautham)
* Modified commit msg in patch 1 (Gautham)
Patches in v7 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/10 | perf/x86/rapl: Remove the unused get_rapl_pmu_cpumask() functionarch/ | +1 | 0 replies | |
| 2/10 | x86/topology: Introduce topology_logical_core_id()Documentation/ arch/ arch/ +2 more | +8 | 0 replies | |
| 3/10 | perf/x86/rapl: Remove the cpu_to_rapl_pmu() functionarch/ | +11 | 0 replies | |
| 4/10 | perf/x86/rapl: Rename rapl_pmu variablesarch/ | +46 | 0 replies | |
| 5/10 | perf/x86/rapl: Make rapl_model struct globalarch/ | +8 | 0 replies | |
| 6/10 | perf/x86/rapl: Add arguments to the init and cleanup functionsarch/ | +16 | 0 replies | |
| 7/10 | perf/x86/rapl: Modify the generic variable names to *_pkg*arch/ | +60 | 0 replies | |
| 8/10 | perf/x86/rapl: Remove the global variable rapl_msrsarch/ | +2 | 0 replies | |
| 9/10 | perf/x86/rapl: Move the cntr_mask to rapl_pmus structarch/ | +8 | 0 replies | |
| 10/10 | perf/x86/rapl: Add core energy counter support for AMD CPUsarch/ | +152 | 12 replies |
Reviews trailers per patch
All 10 patches have a Reviewed-by or Acked-by.
| Patch | Zhang Rui | K Prateek Nayak | Oleksandr Natalenko | Gautham R. Shenoy |
|---|---|---|---|---|
| 1/10 | R-b T-b | |||
| 2/10 | R-b | T-b | T-b | R-b |
| 3/10 | R-b T-b | |||
| 4/10 | R-b T-b | R-b | ||
| 5/10 | R-b T-b | R-b | ||
| 6/10 | R-b T-b | R-b | ||
| 7/10 | R-b T-b | R-b | ||
| 8/10 | R-b T-b | R-b | ||
| 9/10 | R-b T-b | R-b | ||
| 10/10 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.
Cover letter [PATCH v7 00/10] Add RAPL core energy counter support for AMD CPUs
Currently the energy-cores event in the power PMU aggregates energy consumption data at a package level. On the other hand the core energy RAPL counter in AMD CPUs has a core scope (which means the energy consumption is recorded separately for each core). Earlier efforts to add the core event in the power PMU had failed [1], due to the difference in the scope of these two events. Hence, there is a need for a new core scope PMU.
This patchset adds a new "power_core" PMU alongside the existing "power" PMU, which will be responsible for collecting the new "energy-core" event.
Tested the package level and core level PMU counters with workloads pinned to different CPUs.
Results with workload pinned to CPU 4 in core 4 on an AMD Zen4 Genoa machine:
$ sudo perf stat --per-core -e power_core/energy-core/ -- taskset -c 4 stress-ng --matrix 1 --timeout 5s stress-ng: info: [21250] setting to a 5 second run per stressor stress-ng: info: [21250] dispatching hogs: 1 matrix stress-ng: info: [21250] successful run completed in 5.00s
Performance counter stats for 'system wide':
S0-D0-C0 1 0.00 Joules power_core/energy-core/ S0-D0-C1 1 0.00 Joules power_core/energy-core/ S0-D0-C2 1 0.00 Joules power_core/energy-core/ S0-D0-C3 1 0.00 Joules power_core/energy-core/ S0-D0-C4 1 8.43 Joules power_core/energy-core/ S0-D0-C5 1 0.00 Joules power_core/energy-core/ S0-D0-C6 1 0.00 Joules power_core/energy-core/ S0-D0-C7 1 0.00 Joules power_core/energy-core/ S0-D1-C8 1 0.00 Joules power_core/energy-core/ S0-D1-C9 1 0.00 Joules power_core/energy-core/ S0-D1-C10 1 0.00 Joules power_core/energy-core/
v6 Link: https://lore.kernel.org/linux-perf-users/[email protected]/
v6 Changes:
* Pickup rb, tb tags by Rui and Gautham
* Modify the rapl_pmu_idx variable to unsigned int, and modify the comment in get_rapl_pmu_idx() in patch 3 (Gautham)
* Modified commit msg in patch 1 (Gautham)
Base: tip/perf/core
[1]: https://lore.kernel.org/lkml/[email protected]/
Dhananjay Ugwekar (9):
perf/x86/rapl: Remove the unused get_rapl_pmu_cpumask() function perf/x86/rapl: Remove the cpu_to_rapl_pmu() function perf/x86/rapl: Rename rapl_pmu variables perf/x86/rapl: Make rapl_model struct global perf/x86/rapl: Add arguments to the init and cleanup functions perf/x86/rapl: Modify the generic variable names to *_pkg* perf/x86/rapl: Remove the global variable rapl_msrs perf/x86/rapl: Move the cntr_mask to rapl_pmus struct perf/x86/rapl: Add core energy counter support for AMD CPUs
K Prateek Nayak (1):
x86/topology: Introduce topology_logical_core_id()
Documentation/arch/x86/topology.rst | 4 + arch/x86/events/rapl.c | 414 ++++++++++++++++---------- arch/x86/include/asm/processor.h | 1 + arch/x86/include/asm/topology.h | 1 + arch/x86/kernel/cpu/debugfs.c | 1 + arch/x86/kernel/cpu/topology_common.c | 1 + 6 files changed, 272 insertions(+), 150 deletions(-)
Signature · 1 line
2.34.1