Linux Will Be Able To Boot ~0.035 Seconds Faster With One Line Kernel Patch

Written by Michael Larabel in Linux Kernel on 9 August 2024 at 06:29 AM EDT. 40 Comments
LINUX KERNEL
The Linux kernel itself can already boot quite fast but with a simple one-line patch another ~0.035 seconds will be able to be shaved off the boot time.

Intel Linux engineer Colin Ian King discovered that if aligning the slab in the ACPI code via the "SLAB_HWCACHE_ALIGN" flag will offer a measurable improvement in memory performance and reducing the kernel boot time.

Colin explained with this one line kernel patch:
"Enabling SLAB_HWCACHE_ALIGN for the ACPI object caches improves boot speed in the ACPICA core for object allocation and free'ing especially in the AML parsing and execution phases in boot. Testing with 100 boots shows an average boot saving in acpi_init of ~35000 usecs compared to the unaligned version. Most of the ACPI objects being allocated and free'd are of very short life times in the critical paths for parsing and execution, so the extra memory used for alignment isn't too onerous."

Linux has seen a lot of work on optimizing the kernel boot time, going back originally to the days of the netbooks craze and in the years since for better optimizing Linux servers...

Eee PC throwback


A boot savings of around 0.035 seconds will be hardly noticeable to end-users but every little bit counts, especially in the case of hyperscalers and others needing to minimize downtime in the data center whether it be on bare metal servers or VMs. And for just being a one-line patch makes it all the more of an easy and nice win.
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