Meta Continues Working On BOLT'ing The Linux Kernel For Greater Performance

Written by Michael Larabel in LLVM on 16 February 2024 at 10:16 AM EST. 3 Comments
LLVM
Merged to the LLVM compiler stack two years ago was the BOLT tool for optimizing the layout of generated binaries for offering even greater performance than the likes of Profile Guided Optimizations (PGO) alone. BOLT had been in development for years by Facebook/Meta engineers and has continued to be improved upon for enhancing the code layout of binaries to yield enhanced performance. Recently there's been renewed work on using BOLT to optimize Linux kernel images.

Going back years Meta/Facebook engineers have been working on BOLT'ing the Linux kernel for greater performance going back to their original out-of-tree code. Engineers found "double digit speedups" through leveraging BOLT.

Facebook slide on BOLT performance


It's been a while since I heard anything on the BOLT for the Linux kernel topic until recently seeing some new activity in upstream LLVM. This merge landed earlier in the month for BOLT to enable rewriting of the Linux kernel binary and better detecting the Linux kernel image binary. However, that patch by Meta's Maksim Panchenko notes that "the output is not supposed to be functional at the moment" but ultimately is working in that direction.

There's been other pull requests opened recently as well such as for writing support for the Linux kernel ORC with BOLT.

Hopefully it won't be too long before BOLT'ing the Linux kernel with the mainline LLVM code will be fully realized and will be interesting to see the modern performance impact.
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