AMD RAPL PowerCap Patches Updated For Linux - Now Include Family 19h (Zen 3)

Written by Michael Larabel in AMD on 8 October 2020 at 12:09 AM EDT. 1 Comment
AMD
Patches from a Google engineer allow run-time average power limiting (RAPL) support for AMD Zen processors within the Linux PowerCap driver.

Earlier this year was AMD Zen RAPL support in the Perf subsystem while this more recent activity for AMD RAPL has been about the PowerCap code. The Linux PowerCap framework was originally conceived by Intel but AMD Zen CPUs have similar MSRs available for supporting limiting the CPU TDP and also reading the current energy usage. With these patches /sys/class/powercap/intel-rapl/intel-rapl:0/energy_uj is the latest way of exposing the AMD CPU energy usage under Linux.

Back in July we covered the AMD Zen RAPL PowerCap patches by Google's Victor Ding. Now though he sent out a new series. With this latest code for exposing the AMD RAPL counters the notable change is adding a new patch for Family 19h support -- Zen 3.

The Family 19h MSRs around the RAPL counters turn out to be identical to Family 17h (Zen / Zen 2) CPUs and so is extended to work on these forthcoming processors. These latest patches are now out on the kernel mailing list.

It's rather close to seeing the code land for Linux 5.10 given its merge window is opening up in a few days but otherwise this straight-forward code will hopefully be in Linux 5.11.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week