From 672ae7c496ec5b2ac0ff5563991eb98fcdf5311a Mon Sep 17 00:00:00 2001 From: Nils Freydank Date: Sat, 5 Oct 2024 16:25:28 +0200 Subject: [PATCH] pygoscelis: Try out zstd for kernel and initramfs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This not a panic reaction to the xz situation, but certainly an experiment initiated by that. Let’s have a look at compression speed, decompression (startup) speed and compression size. Several changes to configs and packages must be done: - enable kernel support for zstd compression for itself - enable kernel support for zstd compression for the initramfs - adopt firmware names in CONFIG_EXTRA_FIRMWARE - let the initramfs be compressed with zstd - compress firmware files with zstd (before re-building the kernel) For some details see gitea issue https://git.holgersson.xyz/nfr/linux-configs/issues/2. --- pygoscelis-config | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/pygoscelis-config b/pygoscelis-config index 13b3d7e..db3621b 100644 --- a/pygoscelis-config +++ b/pygoscelis-config @@ -42,10 +42,10 @@ CONFIG_HAVE_KERNEL_ZSTD=y # CONFIG_KERNEL_GZIP is not set # CONFIG_KERNEL_BZIP2 is not set # CONFIG_KERNEL_LZMA is not set -CONFIG_KERNEL_XZ=y +# CONFIG_KERNEL_XZ is not set # CONFIG_KERNEL_LZO is not set # CONFIG_KERNEL_LZ4 is not set -# CONFIG_KERNEL_ZSTD is not set +CONFIG_KERNEL_ZSTD=y CONFIG_DEFAULT_INIT="/bin/init" CONFIG_DEFAULT_HOSTNAME="pygoscelis" CONFIG_SYSVIPC=y @@ -233,10 +233,10 @@ CONFIG_INITRAMFS_SOURCE="" # CONFIG_RD_GZIP is not set # CONFIG_RD_BZIP2 is not set # CONFIG_RD_LZMA is not set -CONFIG_RD_XZ=y +# CONFIG_RD_XZ is not set # CONFIG_RD_LZO is not set # CONFIG_RD_LZ4 is not set -# CONFIG_RD_ZSTD is not set +CONFIG_RD_ZSTD=y # CONFIG_BOOT_CONFIG is not set CONFIG_INITRAMFS_PRESERVE_MTIME=y CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y @@ -1773,13 +1773,12 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y # Firmware loader # CONFIG_FW_LOADER=y -CONFIG_FW_LOADER_PAGED_BUF=y -CONFIG_EXTRA_FIRMWARE="amdgpu/renoir_asd.bin.xz amdgpu/renoir_ce.bin.xz amdgpu/renoir_dmcub.bin.xz amdgpu/renoir_gpu_info.bin.xz amdgpu/renoir_me.bin.xz amdgpu/renoir_mec2.bin.xz amdgpu/renoir_mec.bin.xz amdgpu/renoir_pfp.bin.xz amdgpu/renoir_rlc.bin.xz amdgpu/renoir_sdma.bin.xz amdgpu/renoir_ta.bin.xz amdgpu/renoir_vcn.bin.xz regulatory.db regulatory.db.p7s" +CONFIG_EXTRA_FIRMWARE="amdgpu/renoir_asd.bin.zst amdgpu/renoir_ce.bin.zst amdgpu/renoir_dmcub.bin.zst amdgpu/renoir_gpu_info.bin.zst amdgpu/renoir_me.bin.zst amdgpu/renoir_mec2.bin.zst amdgpu/renoir_mec.bin.zst amdgpu/renoir_pfp.bin.zst amdgpu/renoir_rlc.bin.zst amdgpu/renoir_sdma.bin.zst amdgpu/renoir_ta.bin.zst amdgpu/renoir_vcn.bin.zst regulatory.db regulatory.db.p7s" CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware" # CONFIG_FW_LOADER_USER_HELPER is not set CONFIG_FW_LOADER_COMPRESS=y -CONFIG_FW_LOADER_COMPRESS_XZ=y -# CONFIG_FW_LOADER_COMPRESS_ZSTD is not set +# CONFIG_FW_LOADER_COMPRESS_XZ is not set +CONFIG_FW_LOADER_COMPRESS_ZSTD=y CONFIG_FW_CACHE=y # CONFIG_FW_UPLOAD is not set # end of Firmware loader @@ -6747,7 +6746,7 @@ CONFIG_XZ_DEC_X86=y # CONFIG_XZ_DEC_MICROLZMA is not set CONFIG_XZ_DEC_BCJ=y # CONFIG_XZ_DEC_TEST is not set -CONFIG_DECOMPRESS_XZ=y +CONFIG_DECOMPRESS_ZSTD=y CONFIG_GENERIC_ALLOCATOR=y CONFIG_REED_SOLOMON=y CONFIG_REED_SOLOMON_ENC8=y