linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/17] Kernel compression: add ZSTD, remove LZMA1 and BZIP2
@ 2018-11-09 18:59 Adam Borowski
  2018-11-09 19:02 ` [PATCH 01/17] lib: Add support for ZSTD-compressed kernel Adam Borowski
  0 siblings, 1 reply; 21+ messages in thread
From: Adam Borowski @ 2018-11-09 18:59 UTC (permalink / raw)
  To: linux-kernel, Nick Terrell, Russell King, Geert Uytterhoeven,
	linux-m68k, Ralf Baechle, Paul Burton, James Hogan, linux-mips,
	Jonas Bonn, Stefan Kristiansson, Stafford Horne, openrisc,
	James E.J. Bottomley, Helge Deller, linux-parisc,
	Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
	linuxppc-dev, Martin Schwidefsky, Heiko Carstens, linux-s390,
	Yoshinori Sato, Rich Felker, linux-sh, Thomas Gleixner,
	Ingo Molnar, Borislav Petkov, x86, Chris Zankel, Max Filippov,
	linux-xtensa

Hi!
As new compressors get invented, they tend to find their way into the
kernel, yet we never prune superseded ones.  It's time to do so.

In particular, BZIP2 is drastically slower than other compressors we
have, even when they achieve smaller sizes.  It takes more memory, too.
And, BZIP2 is not used anywhere else in the kernel -- just for booting
the kernel itself and the initrd.  Thus, we can drop it from the tree
completely, making Linus happier by around 900 lines.

LZMA1 is redundant with XZ (LZMA2), and unlike the latter, it uses its own
copy of code that's not shared with anything else (some drivers use XZ).
Let's drop it as well.  Some bootloaders can use it thus let's keep the
Kconfig option, but I left no piece of code inside the kernel itself.

On the other hand, Nick Terrell has a couple of patches adding ZSTD support
(using code already in use in multiple pieces around the kernel).  ZSTD is
strong and fast, obsoleting all mid-range compressors.  As the removal of
BZIP2 and LZMA1 would be hopelessly entangled with this addition, I'm
resending Nick's patches here.  I've been booting using them since Oct'17
on amd64 (kernel+initrd), armhf and arm64 (initrd) without issues, other
folks tested various other architectures as well.

Thus, I'd recommend people to use:
* XZ for most machines
* ZSTD where speed is important
* maaaaybe LZ4 is some special cases
(grub and u-boot are ridiculously slow at reading, making fast but weak
decompressors a net loss.  On the other hand, XZ decompresses pretty fast
but is very slow at compress time, making ZSTD preferred for rapid devel
cycles.)

* we can't get rid of GZIP in foreseable future
* LZO is obsolete but is used elsewhere in the kernel

Total:
 69 files changed, 518 insertions(+), 1785 deletions(-)

Not sure whose tree this patchset should go through.  I'm also not sure
how finely split into commits you want the arch bits be; I included
defconfig bits all together, yet separated code changes per-arch.


Meow!
-- 
⢀⣴⠾⠻⢶⣦⠀ 
⣾⠁⢠⠒⠀⣿⡁ A dumb species has no way to open a tuna can.
⢿⡄⠘⠷⠚⠋⠀ A smart species invents a can opener.
⠈⠳⣄⠀⠀⠀⠀ A master species delegates.

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2018-11-13 23:11 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-09 18:59 [PATCH 0/17] Kernel compression: add ZSTD, remove LZMA1 and BZIP2 Adam Borowski
2018-11-09 19:02 ` [PATCH 01/17] lib: Add support for ZSTD-compressed kernel Adam Borowski
2018-11-09 19:02   ` [PATCH 02/17] x86: " Adam Borowski
2018-11-12  4:22     ` Ingo Molnar
2018-11-09 19:02   ` [PATCH 03/17] .gitignore: add ZSTD-compressed files Adam Borowski
2018-11-09 19:02   ` [PATCH 04/17] x86: Remove support for BZIP2 and LZMA compressed kernel Adam Borowski
2018-11-09 19:02   ` [PATCH 05/17] mips: " Adam Borowski
2018-11-13 22:45     ` Paul Burton
2018-11-13 23:10       ` Adam Borowski
2018-11-09 19:02   ` [PATCH 06/17] parisc: " Adam Borowski
2018-11-09 19:02   ` [PATCH 07/17] s390: " Adam Borowski
2018-11-09 19:02   ` [PATCH 08/17] sh: " Adam Borowski
2018-11-09 19:02   ` [PATCH 09/17] unicore32: " Adam Borowski
2018-11-09 19:02   ` [PATCH 10/17] arm: Remove support for " Adam Borowski
2018-11-09 19:02   ` [PATCH 11/17] Kconfig: Remove support for BZIP2-compressed initrd and kernel Adam Borowski
2018-11-09 19:02   ` [PATCH 12/17] Kconfig: Remove support for LZMA-compressed initrd Adam Borowski
2018-11-09 19:03   ` [PATCH 13/17] arch/*: Purge references to CONFIG_RD_BZIP2/LZMA from various defconfigs Adam Borowski
2018-11-09 19:03   ` [PATCH 14/17] lib: Completely purge now-unused bzip2 code from the kernel Adam Borowski
2018-11-09 19:03   ` [PATCH 15/17] lib: Completely purge now-unused lzma " Adam Borowski
2018-11-09 19:03   ` [PATCH 16/17] Kconfig: Update the prose for selection of compression algorithm Adam Borowski
2018-11-09 19:03   ` [PATCH 17/17] [NOT FOR MERGING] lib: Be noisy about used decompression method Adam Borowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).