AMD Posts New Linux Patches For Per-Core CPU Energy Counters
After an attempt in early 2023 didn't pan out, today an AMD Linux engineer posted a new kernel patch series for enabling per-core RAPL energy counter support for AMD processors. With this patch series when using Linux's venerable perf utility it's now possible for reading the power use on a per CPU core basis using a new "power_per_core" PMU.
The patch series posted on Monday morning by AMD's Dhananjay Ugwekar adds a new "power_per_core" PMU metric as a per-core energy counter. Ugwekar explained in the patch series:
With this there's the ability to now see on a per-core basis the energy use to complement the existing socket/package-level use.
The patches for this per-core energy counter support are now out for review and will hopefully make it to the mainline kernel now that it works around last year's obstacle to the support.
The patch series posted on Monday morning by AMD's Dhananjay Ugwekar adds a new "power_per_core" PMU metric as a per-core energy counter. Ugwekar explained in the patch series:
"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, 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_per_core" PMU alongside the existing "power" PMU, which will be responsible for collecting the new "energy-per-core" event."
With this there's the ability to now see on a per-core basis the energy use to complement the existing socket/package-level use.
The patches for this per-core energy counter support are now out for review and will hopefully make it to the mainline kernel now that it works around last year's obstacle to the support.
4 Comments