Google Using AutoFDO On Linux Meant Up To 12% Less Cycles Spent Within The Kernel
Written by Michael Larabel in Google on 28 August 2020 at 05:40 AM EDT. 8 Comments
While a Microsoft engineer was at Linux Plumbers Conference this week talking up their LTO and PGO optimization work for the Linux kernel, Google engineers have now one upped that work by also shipping kernels with AutoFDO optimizations.

Google is not only leveraging link-time optimizations (LTO) and profile-guided optimizations (PGO) for maximizing compiler-based efficiencies of their kernel images but also auto feedback directed optimizations. AutoFDO relies upon CPU hardware counters with a sampling based profile for driving feedback to the compiler for better optimizing the binaries. AutoFDO uses data collected by Linux's perf subsystem with hardware counters and using that information for making more informed decisions regarding optimizations. More details on AutoFDO can be found via this Wiki page.

AutoFDO has the benefit of not needing specialized builds in the first place, unlike PGO, for collecting the profile information. But AutoFDO obviously still requires a run of the program in order to collect the samples.

Google's Sami Tolvanen, Bill Wendling, and Nick Desaulniers talked at LPC 2020 about their LTO/PGO/AutoFDO adventures for the kernels they are now shipping at Google. One of the most interesting tid-bits of information they shared was in regards to the AutoFDO results. When making use of AutoFDO, they found up to a 12% reduction in cycles spent in the kernel. That 12% appears to be for x86_64 hardware while other microarchitectures weren't quite as good but still benefiting. In part it may also be a function of the accuracy of the collected hardware counters for how well AutoFDO can optimize the software being built.

In any case, those interested in more details on Google's adventures with LTO + PGO + AutoFDO for the Linux kernel can see the slide deck for all the details.
Related News
About The Author
Author picture

Michael Larabel is the principal author of 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 automated benchmarking software. He can be followed via Twitter or contacted via

Popular News This Week