AMD Energy Driver Queued Ahead Of Linux 5.8 For Core/Package Power Sensors
Landing this weekend in hwmon-next ahead of the upcoming Linux 5.8 kernel cycle is the recently reported on "amd_energy" driver for supporting AMD Zen/Zen2 core and package energy sensors.
This is the recently reported on work of a Google engineer allowing AMD Zen CPUs to expose power usage on Linux via the Runtime Average Power Limiting (RAPL) framework. The amd_energy driver is making it to the Linux 5.8 kernel by way of the hardware monitoring "hwmon" subsystem thanks to work by AMD engineers following the prior Google patch series.
Having this reporting for modern AMD CPUs on Linux is something we have long wanted to see but something that hadn't been worked on by AMD for the Linux kernel while under Windows there is similar reporting via Ryzen Master, etc.
This amd_energy driver addition plus the recent community work on the k10temp driver now allows for good CPU thermal monitoring and core/package energy reporting under Linux. There still are some gaps on the thermal side, but at least in fairly good shape for those wanting to read those numbers under Linux.
The amd_energy driver is just over 400 lines of new code. Google engineers wrote this driver based on public AMD data sheets concerning the relevant MSRs. The numbers are reported via sysfs for those interested.
This is the recently reported on work of a Google engineer allowing AMD Zen CPUs to expose power usage on Linux via the Runtime Average Power Limiting (RAPL) framework. The amd_energy driver is making it to the Linux 5.8 kernel by way of the hardware monitoring "hwmon" subsystem thanks to work by AMD engineers following the prior Google patch series.
Having this reporting for modern AMD CPUs on Linux is something we have long wanted to see but something that hadn't been worked on by AMD for the Linux kernel while under Windows there is similar reporting via Ryzen Master, etc.
This amd_energy driver addition plus the recent community work on the k10temp driver now allows for good CPU thermal monitoring and core/package energy reporting under Linux. There still are some gaps on the thermal side, but at least in fairly good shape for those wanting to read those numbers under Linux.
The amd_energy driver is just over 400 lines of new code. Google engineers wrote this driver based on public AMD data sheets concerning the relevant MSRs. The numbers are reported via sysfs for those interested.
8 Comments