Linux EFI Zboot Abandoning "Compression Library Museum", Focusing On Gzip & Zstd

Written by Michael Larabel in Linux Kernel on 8 December 2024 at 09:50 AM EST. 50 Comments
LINUX KERNEL
The Linux kernel EFI Zboot code for carrying the Linux kernel image for EFI systems in compressed form is doing away with its "compression library museum" of offering Gzip, LZ4, LZMA, LZO, XZ, and Zstd compression options to instead just focus on Gzip and Zstd compression support.

Rather than offfering many different compression options for the EFI Zboot code, a patch working its way to the mainline kernel is reducing it down to just two choices for compression: Gzip or Zstd. Ard Biesheuvel explains in the patch limiting the compression options to Gzip and Zstd:
"For historical reasons, the legacy decompressor code on various architectures supports 7 different compression types for the compressed kernel image.

EFI zboot is not a compression library museum, and so the options can be limited to what is likely to be useful in practice:

- GZIP is tried and tested, and is still one of the fastest at decompression time, although the compression ratio is not very high; moreover, Fedora is already shipping EFI zboot kernels for arm64 that use GZIP, and QEMU implements direct support for it when booting a kernel without firmware loaded;

- ZSTD has a very high compression ratio (although not the highest), and is almost as fast as GZIP at decompression time.

Reducing the number of options makes it less of a hassle for other consumers of the EFI zboot format (such as QEMU today, and kexec in the future) to support it transparently without having to carry 7 different decompression libraries."

A wise decision to just focus on Gzip and Zstd and to get rid of all the other superfluous options these days... Now if only the Zstd code within the Linux kernel would rebase against the latest upstream state...

Tux on a hard drive


The patch to limit the compression options has been queued into efi.git's "urgent" Git branch. With it queued in the "urgent" code rather than its "next" branch, it's likely to be submitted in the coming days for the ongoing Linux 6.13 cycle rather than holding off until the 6.14 cycle. This change only affects EFI Zboot and doesn't impact the compression/decompression options for other areas of the Linux kernel.
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