]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
tools/power turbostat: Add support for AMD Fam 17h (Zen) RAPL
authorCalvin Walton <calvin.walton@kepstin.ca>
Fri, 17 Aug 2018 16:34:41 +0000 (12:34 -0400)
committerLen Brown <len.brown@intel.com>
Thu, 21 Mar 2019 02:55:45 +0000 (22:55 -0400)
commit9392bd98bba760be96ee67f51cb040dcf7aa190e
tree4b6f7973e3d89bbcfb933d5760f51fe4588f4614
parent0a42d235e50d677775056324d0762dd102a9ebb0
tools/power turbostat: Add support for AMD Fam 17h (Zen) RAPL

Based on the Open-Source Register Reference for AMD Family 17h
Processors Models 00h-2Fh:
https://support.amd.com/TechDocs/56255_OSRR.pdf

These processors report RAPL support in bit 14 of CPUID 0x80000007 EDX,
and the following MSRs are present:
0xc0010299 (RAPL_PWR_UNIT), like Intel's RAPL_POWER_UNIT
0xc001029a (CORE_ENERGY_STAT), kind of like Intel's PP0_ENERGY_STATUS
0xc001029b (PKG_ENERGY_STAT), like Intel's PKG_ENERGY_STATUS

A notable difference from the Intel implementation is that AMD reports
the "Cores" energy usage separately for each core, rather than a
per-package total. The code has been adjusted to handle either case in a
generic way.

I haven't yet enabled collection of package power, due to being unable
to test it on multi-node systems (TR, EPYC).

Signed-off-by: Calvin Walton <calvin.walton@kepstin.ca>
Signed-off-by: Len Brown <len.brown@intel.com>
tools/power/x86/turbostat/turbostat.c