AMD P-State Tracer Tool To Be Included With Linux 5.18

Written by Michael Larabel in AMD on 13 March 2022 at 06:56 AM EDT. 7 Comments
AMD
One of the most prominent additions to the Linux 5.17 kernel is the introduction of the AMD P-State driver akin to Intel's P-State driver and aims to deliver better energy efficiency than AMD Zen 2 and newer processors currently on the ACPI CPUFreq driver. With Linux 5.18 an AMD P-State tracer tool is to be included with the kernel source tree for helping to analyze and tune this new driver.

The AMD P-State driver makes use of ACPI Collaborative Processor Performance Controls (CPPC) found with Zen 2 and newer systems when exposed by the platform/BIOS. The new AMD P-State driver should really help with desktops/mobile such as with the Steam Deck, as Valve did work on this driver collaboratively with AMD over the course of the past year.

The Linux 5.18 source tree is picking up the "amd_pstate_tracer.py" tool that is used for recording and parsing amd-pstate driver trace logs. The intent is to use this new tool for debugging and tuning the driver.

While not part of the kernel per se, amd_pstate_tracer.py is like a number of other tools that live within the kernel source tree. Those interested will eb able to find this tool within linux/tools/power/x86/amd_pstate_tracer. As root this Python script can record traces looking at the performance behavior of P-State and then report details how much time was spent in each performance state and other details on the behavior.


In the process of introducing the AMD P-State tracer, this also imports/updates the Intel P-State Tracer code already within the kernel for which AMD is then building atop.

This tool along with adding new trace events to the amd_pstate driver itself were picked up a few days ago via the Linux power management's linux-next branch ahead of the Linux 5.18 merge window opening up. The Linux 5.18 merge window should kick off tomorrow if Linux 5.17 goes ahead and releases today and isn't delayed to next week.
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