Re: [RFC PATCH] treewide: remove bzip2 compression support
Excerpts from Alex Xu (Hello71)'s message of December 15, 2020 2:03 pm: > bzip2 is either slower or larger than every other supported algorithm, > according to benchmarks at [0]. It is far slower to decompress than any > other algorithm, and still larger than lzma, xz, and zstd. > > [0] https://lore.kernel.org/lkml/1588791882.08g1378g67.none@localhost/ > > Signed-off-by: Alex Xu (Hello71) Upon further research, I found that bzip2 removal was already implemented as part of zstd addition, but were apparently abandoned in an effort to get zstd in. I will check those patches and try sending those instead. Thanks to all reviewers for comments on this patch.
[RFC PATCH] treewide: remove bzip2 compression support
bzip2 is either slower or larger than every other supported algorithm, according to benchmarks at [0]. It is far slower to decompress than any other algorithm, and still larger than lzma, xz, and zstd. [0] https://lore.kernel.org/lkml/1588791882.08g1378g67.none@localhost/ Signed-off-by: Alex Xu (Hello71) --- Documentation/x86/boot.rst | 8 +- arch/arm/configs/aspeed_g4_defconfig | 1 - arch/arm/configs/aspeed_g5_defconfig | 1 - arch/arm/configs/ezx_defconfig | 1 - arch/arm/configs/imote2_defconfig | 1 - arch/arm/configs/lpc18xx_defconfig | 1 - arch/arm/configs/vf610m4_defconfig | 1 - arch/arm64/boot/Makefile | 5 +- arch/mips/Kconfig | 1 - arch/mips/Makefile | 3 - arch/mips/boot/Makefile| 14 - arch/mips/boot/compressed/Makefile | 1 - arch/mips/boot/compressed/decompress.c | 4 - arch/mips/configs/ath25_defconfig | 1 - arch/mips/configs/pistachio_defconfig | 1 - arch/openrisc/configs/simple_smp_defconfig | 1 - arch/parisc/Kconfig| 1 - arch/parisc/boot/compressed/Makefile | 5 +- arch/parisc/boot/compressed/misc.c | 4 - arch/powerpc/configs/skiroot_defconfig | 1 - arch/riscv/boot/Makefile | 3 - arch/riscv/configs/nommu_k210_defconfig| 1 - arch/riscv/configs/nommu_virt_defconfig| 1 - arch/s390/Kconfig | 1 - arch/s390/boot/compressed/Makefile | 5 +- arch/s390/boot/compressed/decompressor.c | 8 - arch/sh/Kconfig| 1 - arch/sh/Makefile | 3 +- arch/sh/boot/Makefile | 11 +- arch/sh/boot/compressed/Makefile | 5 +- arch/sh/boot/compressed/misc.c | 8 - arch/sh/configs/sdk7786_defconfig | 1 - arch/x86/Kconfig | 1 - arch/x86/boot/compressed/Makefile | 9 +- arch/x86/boot/compressed/misc.c| 4 - arch/x86/include/asm/boot.h| 4 +- arch/xtensa/configs/cadence_csp_defconfig | 1 - arch/xtensa/configs/nommu_kc705_defconfig | 1 - include/linux/decompress/bunzip2.h | 11 - init/Kconfig | 22 +- init/do_mounts_rd.c| 1 - kernel/configs/tiny.config | 1 - lib/Kconfig| 3 - lib/Makefile | 1 - lib/decompress.c | 5 - lib/decompress_bunzip2.c | 756 - scripts/Makefile.lib | 8 +- scripts/Makefile.package | 1 - scripts/package/buildtar | 2 +- usr/Kconfig| 26 +- usr/Makefile | 3 +- 51 files changed, 22 insertions(+), 942 deletions(-) delete mode 100644 include/linux/decompress/bunzip2.h delete mode 100644 lib/decompress_bunzip2.c diff --git a/Documentation/x86/boot.rst b/Documentation/x86/boot.rst index abb9fc164657..741eebc10140 100644 --- a/Documentation/x86/boot.rst +++ b/Documentation/x86/boot.rst @@ -781,10 +781,10 @@ Protocol: 2.08+ The payload may be compressed. The format of both the compressed and uncompressed data should be determined using the standard magic numbers. The currently supported compression formats are gzip - (magic numbers 1F 8B or 1F 9E), bzip2 (magic number 42 5A), LZMA - (magic number 5D 00), XZ (magic number FD 37), LZ4 (magic number - 02 21) and ZSTD (magic number 28 B5). The uncompressed payload is - currently always ELF (magic number 7F 45 4C 46). + (magic numbers 1F 8B or 1F 9E), LZMA (magic number 5D 00), XZ (magic + number FD 37), LZ4 (magic number 02 21) and ZSTD (magic number 28 B5). + Formerly supported was bzip2 (magic number 42 5A). The uncompressed + payload is currently always ELF (magic number 7F 45 4C 46). == Field name:payload_length diff --git a/arch/arm/configs/aspeed_g4_defconfig b/arch/arm/configs/aspeed_g4_defconfig index 58d293b63581..f2f5dcd0e59c 100644 --- a/arch/arm/configs/aspeed_g4_defconfig +++ b/arch/arm/configs/aspeed_g4_defconfig @@ -8,7 +8,6 @@ CONFIG_IKCONFIG_PROC=y CONFIG_LOG_BUF_SHIFT=16 CONFIG_CGROUPS=y CONFIG_BLK_DEV_INITRD=y -# CONFIG_RD_BZIP2 is not set # CONFIG_RD_LZO is not set # CONFIG_RD_LZ4 is not set # CONFIG_UID16 is not set diff --git a/arch/arm/configs/aspeed_g5_defconfig b/arch/arm/configs/aspeed_g5_defconfig index 047975eccefb..5d045b2902d6 100644 --- a/arch/arm/configs/aspeed_g5_defconfig +++ b/arch/arm/configs/aspeed_g5_defconfig @@ -8,7 +8,6 @@ CONFIG_IKCONFIG_PROC=y CONFIG_LOG_BUF_SHIFT=16 CONFIG_CGROUPS=y CONFIG_BLK_DEV_INITRD=y -# CONFIG_RD_BZIP2 is not set # CONFIG_RD_LZO is not set #
Re: [RFC PATCH] treewide: remove bzip2 compression support
Hello, On Tue, Dec 15, 2020 at 02:03:15PM -0500, Alex Xu (Hello71) wrote: > bzip2 is either slower or larger than every other supported algorithm, > according to benchmarks at [0]. It is far slower to decompress than any > other algorithm, and still larger than lzma, xz, and zstd. > > [0] https://lore.kernel.org/lkml/1588791882.08g1378g67.none@localhost/ Sounds cool. I wonder how many people will complain that their distribution migrated to bzip2 but got stuck there and now new kernels won't work on there with some odd tool or another :p > @@ -212,11 +209,6 @@ choice > Compression speed is only relevant when building a kernel. > Decompression speed is relevant at each boot. > > - If you have any problems with bzip2 or lzma compressed > - kernels, mail me (Alain Knaff) . (An older > - version of this functionality (bzip2 only), for 2.4, was > - supplied by Christian Ludwig) > - Shouldn't the LZMA part be preserved here? Thanks Michal
[RFC PATCH] treewide: remove bzip2 compression support
bzip2 is either slower or larger than every other supported algorithm, according to benchmarks at [0]. It is far slower to decompress than any other algorithm, and still larger than lzma, xz, and zstd. [0] https://lore.kernel.org/lkml/1588791882.08g1378g67.none@localhost/ Signed-off-by: Alex Xu (Hello71) --- Documentation/x86/boot.rst | 8 +- arch/arm/configs/aspeed_g4_defconfig | 1 - arch/arm/configs/aspeed_g5_defconfig | 1 - arch/arm/configs/ezx_defconfig | 1 - arch/arm/configs/imote2_defconfig | 1 - arch/arm/configs/lpc18xx_defconfig | 1 - arch/arm/configs/vf610m4_defconfig | 1 - arch/arm64/boot/Makefile | 5 +- arch/mips/Kconfig | 1 - arch/mips/Makefile | 3 - arch/mips/boot/Makefile| 14 - arch/mips/boot/compressed/Makefile | 1 - arch/mips/boot/compressed/decompress.c | 4 - arch/mips/configs/ath25_defconfig | 1 - arch/mips/configs/pistachio_defconfig | 1 - arch/openrisc/configs/simple_smp_defconfig | 1 - arch/parisc/Kconfig| 1 - arch/parisc/boot/compressed/Makefile | 5 +- arch/parisc/boot/compressed/misc.c | 4 - arch/powerpc/configs/skiroot_defconfig | 1 - arch/riscv/boot/Makefile | 3 - arch/riscv/configs/nommu_k210_defconfig| 1 - arch/riscv/configs/nommu_virt_defconfig| 1 - arch/s390/Kconfig | 1 - arch/s390/boot/compressed/Makefile | 5 +- arch/s390/boot/compressed/decompressor.c | 8 - arch/sh/Kconfig| 1 - arch/sh/Makefile | 3 +- arch/sh/boot/Makefile | 11 +- arch/sh/boot/compressed/Makefile | 5 +- arch/sh/boot/compressed/misc.c | 8 - arch/sh/configs/sdk7786_defconfig | 1 - arch/x86/Kconfig | 1 - arch/x86/boot/compressed/Makefile | 9 +- arch/x86/boot/compressed/misc.c| 4 - arch/x86/include/asm/boot.h| 4 +- arch/xtensa/configs/cadence_csp_defconfig | 1 - arch/xtensa/configs/nommu_kc705_defconfig | 1 - include/linux/decompress/bunzip2.h | 11 - init/Kconfig | 22 +- init/do_mounts_rd.c| 1 - kernel/configs/tiny.config | 1 - lib/Kconfig| 3 - lib/Makefile | 1 - lib/decompress.c | 5 - lib/decompress_bunzip2.c | 756 - scripts/Makefile.lib | 8 +- scripts/Makefile.package | 1 - scripts/package/buildtar | 2 +- usr/Kconfig| 26 +- usr/Makefile | 3 +- 51 files changed, 22 insertions(+), 942 deletions(-) delete mode 100644 include/linux/decompress/bunzip2.h delete mode 100644 lib/decompress_bunzip2.c diff --git a/Documentation/x86/boot.rst b/Documentation/x86/boot.rst index abb9fc164657..b74d14caabe6 100644 --- a/Documentation/x86/boot.rst +++ b/Documentation/x86/boot.rst @@ -781,10 +781,10 @@ Protocol: 2.08+ The payload may be compressed. The format of both the compressed and uncompressed data should be determined using the standard magic numbers. The currently supported compression formats are gzip - (magic numbers 1F 8B or 1F 9E), bzip2 (magic number 42 5A), LZMA - (magic number 5D 00), XZ (magic number FD 37), LZ4 (magic number - 02 21) and ZSTD (magic number 28 B5). The uncompressed payload is - currently always ELF (magic number 7F 45 4C 46). + (magic numbers 1F 8B or 1F 9E), LZMA (magic number 5D 00), XZ (magic + number FD 37), LZ4 (magic number 02 21) and ZSTD (magic number 28 + B5). The uncompressed payload is currently always ELF (magic number + 7F 45 4C 46). == Field name:payload_length diff --git a/arch/arm/configs/aspeed_g4_defconfig b/arch/arm/configs/aspeed_g4_defconfig index 58d293b63581..f2f5dcd0e59c 100644 --- a/arch/arm/configs/aspeed_g4_defconfig +++ b/arch/arm/configs/aspeed_g4_defconfig @@ -8,7 +8,6 @@ CONFIG_IKCONFIG_PROC=y CONFIG_LOG_BUF_SHIFT=16 CONFIG_CGROUPS=y CONFIG_BLK_DEV_INITRD=y -# CONFIG_RD_BZIP2 is not set # CONFIG_RD_LZO is not set # CONFIG_RD_LZ4 is not set # CONFIG_UID16 is not set diff --git a/arch/arm/configs/aspeed_g5_defconfig b/arch/arm/configs/aspeed_g5_defconfig index 047975eccefb..5d045b2902d6 100644 --- a/arch/arm/configs/aspeed_g5_defconfig +++ b/arch/arm/configs/aspeed_g5_defconfig @@ -8,7 +8,6 @@ CONFIG_IKCONFIG_PROC=y CONFIG_LOG_BUF_SHIFT=16 CONFIG_CGROUPS=y CONFIG_BLK_DEV_INITRD=y -# CONFIG_RD_BZIP2 is not set # CONFIG_RD_LZO is not set # CONFIG_RD_LZ4 is not set # CONFIG_UID16 is not set diff