AMD Posts New CPUFreq Driver For CPPC Support With Zen 2 CPUs

The AMD CPPC support with Zen 2 desktop/server/mobile CPUs can be optionally enabled and allows setting min/maximum performance along with desired performance and other knobs for tuning via sysfs.
This new AMD CPU frequency scaling driver is called "amd_cpufreq" and can be flipped on under supported kernels with the amd_cpufreq.cppc_enable=1 kernel flag or amd_cpufreq=enable. But given the timing of these new patches being posted, sadly it's unlikely to see this new driver queued for the currently open Linux 5.3 merge window and thus will have to wait for Linux 5.4 later in the year.
AMD will be documenting different performance/power options within performance/optimization guides. They also plan to develop a Linux user-space tool for generating CPPC profiles for a target workload. Likewise, there is no generic/default CPPC policy at this time.
The ACPI CPPC specification allows for the operating system to better manage the power/performance of the processor based on an abstract performance scale. This amd_cpufreq driver exposes more knobs than what is supported by the existing Linux kernel's acpi_cppc driver. That existing kernel CPPC code has largely been focused on Arm's support for this functionality while it's great with Zen 2 there is now the support on the AMD front.
Once this code is mainlined it should provide for interesting tests. The initial yet-to-be-reviewed patches can be found on the LKML.
16 Comments