AMD P-State vs. ACPI CPUFreq Testing With Ryzen Laptops On Linux 5.17
One of the most prominent features of Linux 5.17 for end-users was the introduction of the AMD P-State driver that is designed to deliver better energy efficiency than the generic ACPI CPUFreq frequency scaling driver relied on by AMD Ryzen processors up to this point. For those wondering how the performance and efficiency currently compare for Ryzen laptops, here are some benchmarks recently carried out on Linux 5.17 for both drivers and testing both the Schedutil and Performance governors.
The AMD P-State driver introduced in Linux 5.17 was developed by AMD in cooperation with partners like Valve for improving the efficiency of modern Ryzen hardware on Linux by being able to have more precise CPU frequency scaling controls. AMD P-State makes use of ACPI CPPC (Collaborative Processor Performance Controls) supported by Zen 2 processors and newer -- thus the hard requirement for amd_pstate of only Zen 2 and newer hardware supported and the motherboard must also have CPPC enabled via the BIOS where relevant.
Enabling AMD P-State on Linux 5.17 can be a bit of a nuisance but AMD is making it easier to enable presumably now as a 5.19 cycle change. For this round of testing I recently ran some tests of ACPI CPUFreq and AMD P-State off the Linux 5.17 kernel. For both ACPI CPUFreq and AMD P-State I tested both drivers using the scheduler utilization "Schedutil" governor as the default used by most distributions with AMD CPUs and then again when using the "performance" governor.
For this round of testing I was using a Ryzen 5 5500U (Zen 2) and Ryzen 9 5900HX (Zen 3) laptops given they are the latest AMD laptops I have available for testing and should offer an interesting look at how well amd_pstate is in its initial mainline state. The CPU power consumption exposed via RAPL/PowerCap was monitored for each benchmark as was the CPU temperature for seeing the impact of this AMD CPU frequency scaling driver change. Additionally, the CPU peak frequency recorded for the highest frequency recorded out of any of the CPU cores was also logged.