summarylogtreecommitdiffstats
path: root/0006-usr-add-support-for-zstd-compressed-initramfs.patch
diff options
context:
space:
mode:
authorLuca Stefani2020-08-04 08:29:33 +0200
committerLuca Stefani2020-08-04 08:29:33 +0200
commit017e6d9d63f10c981a01976d4c6fb7954c916633 (patch)
treeafb54f0feea912e32ac1b53de23f437665ba07e8 /0006-usr-add-support-for-zstd-compressed-initramfs.patch
parent9a0e9d350f0cc2df521d28a052fcb044e7bec8a8 (diff)
downloadaur-017e6d9d63f10c981a01976d4c6fb7954c916633.tar.gz
5.8.arch1-1
Diffstat (limited to '0006-usr-add-support-for-zstd-compressed-initramfs.patch')
-rw-r--r--0006-usr-add-support-for-zstd-compressed-initramfs.patch83
1 files changed, 0 insertions, 83 deletions
diff --git a/0006-usr-add-support-for-zstd-compressed-initramfs.patch b/0006-usr-add-support-for-zstd-compressed-initramfs.patch
deleted file mode 100644
index e1559218b253..000000000000
--- a/0006-usr-add-support-for-zstd-compressed-initramfs.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-From 79ac8f7bf303195b207b7731dbfab5bb4e60d2a8 Mon Sep 17 00:00:00 2001
-From: Nick Terrell <terrelln@fb.com>
-Date: Thu, 20 Jun 2019 15:15:46 -0700
-Subject: [PATCH 6/9] usr: add support for zstd compressed initramfs
-
-* Add support for a zstd compressed initramfs.
-* Add compression for compressing built-in initramfs with zstd.
-
-I have tested this patch by boot testing with buildroot and QEMU.
-Specifically, I booted the kernel with both a zstd and gzip compressed
-initramfs, both built into the kernel and separate. I ensured that the
-correct compression algorithm was used. I tested on arm, aarch64, i386,
-and x86_64.
-
-This patch has been tested in production on aarch64 and x86_64 devices.
-
-Additionally, I have performance measurements from internal use in
-production. On an aarch64 device we saw 19 second boot time improvement
-from switching from lzma to zstd (27 seconds to 8 seconds). On an x86_64
-device we saw a 9 second boot time reduction from switching from xz to
-zstd.
-
-Reviewed-by: Kees Cook <keescook@chromium.org>
-Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
-Signed-off-by: Nick Terrell <terrelln@fb.com>
----
- usr/Kconfig | 20 ++++++++++++++++++++
- usr/Makefile | 1 +
- 2 files changed, 21 insertions(+)
-
-diff --git a/usr/Kconfig b/usr/Kconfig
-index 96afb03b65f9..2599bc21c1b2 100644
---- a/usr/Kconfig
-+++ b/usr/Kconfig
-@@ -100,6 +100,15 @@ config RD_LZ4
- Support loading of a LZ4 encoded initial ramdisk or cpio buffer
- If unsure, say N.
-
-+config RD_ZSTD
-+ bool "Support initial ramdisk/ramfs compressed using ZSTD"
-+ default y
-+ depends on BLK_DEV_INITRD
-+ select DECOMPRESS_ZSTD
-+ help
-+ Support loading of a ZSTD encoded initial ramdisk or cpio buffer.
-+ If unsure, say N.
-+
- choice
- prompt "Built-in initramfs compression mode"
- depends on INITRAMFS_SOURCE != ""
-@@ -196,6 +205,17 @@ config INITRAMFS_COMPRESSION_LZ4
- If you choose this, keep in mind that most distros don't provide lz4
- by default which could cause a build failure.
-
-+config INITRAMFS_COMPRESSION_ZSTD
-+ bool "ZSTD"
-+ depends on RD_ZSTD
-+ help
-+ ZSTD is a compression algorithm targeting intermediate compression
-+ with fast decompression speed. It will compress better than GZIP and
-+ decompress around the same speed as LZO, but slower than LZ4.
-+
-+ If you choose this, keep in mind that you may need to install the zstd
-+ tool to be able to compress the initram.
-+
- config INITRAMFS_COMPRESSION_NONE
- bool "None"
- help
-diff --git a/usr/Makefile b/usr/Makefile
-index c12e6b15ce72..b1a81a40eab1 100644
---- a/usr/Makefile
-+++ b/usr/Makefile
-@@ -15,6 +15,7 @@ compress-$(CONFIG_INITRAMFS_COMPRESSION_LZMA) := lzma
- compress-$(CONFIG_INITRAMFS_COMPRESSION_XZ) := xzmisc
- compress-$(CONFIG_INITRAMFS_COMPRESSION_LZO) := lzo
- compress-$(CONFIG_INITRAMFS_COMPRESSION_LZ4) := lz4
-+compress-$(CONFIG_INITRAMFS_COMPRESSION_ZSTD) := zstd
-
- obj-$(CONFIG_BLK_DEV_INITRD) := initramfs_data.o
-
---
-2.28.0
-