Deferred Enabling Of ACPI CPUFreq Boost Support Can Help Boot Times For Large Servers

Written by Michael Larabel in Linux Kernel on 3 November 2022 at 01:45 PM EDT. 4 Comments
LINUX KERNEL
With CPU core counts continuing to rise, we've seen various optimization efforts in recent times to help with the boot speed of getting large servers online. One of the latest discoveries can trim down the boot speed by up to 30 seconds for some large servers and what appears to be a next-generation AMD EPYC "Genoa" platform.

Linux kernel contributor and system administrator Stuart Hayes noticed that when the ACPI CPUFreq driver is loaded, CPU boosting support is enabled sequentially by setting the appropriate model specific registers (MSRs) before the driver is even registered with CPUFreq. This ends up being rather time consuming with today's high core count servers with the one-at-a-time per-core CPU boost enabling. It's also possible that the time can be completely wasted if CPUFreq registering of the driver fails.

Stuart sent out a patch instead to defer setting of the boost MSRs with the ACPI CPUFreq driver. He commented, "Since cpufreq already sets up a CPU hotplug startup callback if and when acpi-cpufreq is registered, set the boost MSRs in acpi_cpufreq_cpu_init(), which is called by the cpufreq cpuhp callback. This allows acpi-cpufreq to exit quickly if it is loaded but not needed."


Increasingly high core count servers is leading to new Linux kernel optimizations around enhancing the boot speed and other current inefficiencies of kernel code written during times long ago.


This change is to the generic ACPI CPUFreq driver, which is used by various Arm server processors as well as AMD CPUs unless using the newer AMD P-State driver and the Intel server CPUs are generally on the Intel P-State driver. Hayes noted that the small code patch was able to speed up booting on a test server by about 30 seconds. The server mentioned had 192 CPU cores. Given 192 CPU cores is a bit of an odd combination right now, it's more than likely an AMD EPYC Genoa server that is already public knowledge as maxing out at 96 CPU cores per socket. In any event this change isn't specific to Genoa and will help any large core count systems making use of the ACPI CPUFreq driver.

This boot time saving improvement for large core count systems is currently out for review/comment on the linux-pm mailing list.
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