* Re: [GIT PULL][PATCH v5 0/8] Add support for ZSTD-compressed kernel and initramfs
@ 2020-06-01 21:58 Norbert Lange
2020-06-01 22:01 ` Nick Terrell
2020-06-01 22:01 ` Sedat Dilek
0 siblings, 2 replies; 6+ messages in thread
From: Norbert Lange @ 2020-06-01 21:58 UTC (permalink / raw)
To: nickrterrell, akpm
Cc: Kernel-team, clm, gregkh, keescook, kilobyte, linux-kbuild,
linux-kernel, mingo, oss, patrick, patrickw3, rmikey,
sedat.dilek, terrelln, x86
The series seems to be stuck in limbo, and I got the hint to bring
this to Andrew's attention [1].
Hope this will finally end in upstream, been using these patches for ~2 years.
Regards, Norbert
[1] - https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=955469
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [GIT PULL][PATCH v5 0/8] Add support for ZSTD-compressed kernel and initramfs
2020-06-01 21:58 [GIT PULL][PATCH v5 0/8] Add support for ZSTD-compressed kernel and initramfs Norbert Lange
@ 2020-06-01 22:01 ` Nick Terrell
2020-06-16 16:27 ` Sedat Dilek
2020-06-01 22:01 ` Sedat Dilek
1 sibling, 1 reply; 6+ messages in thread
From: Nick Terrell @ 2020-06-01 22:01 UTC (permalink / raw)
To: Norbert Lange
Cc: Nick Terrell, akpm, Kernel Team, Chris Mason, gregkh, Kees Cook,
Adam Borowski, linux-kbuild, linux-kernel, mingo, Petr Malat,
Patrick Williams, Patrick Williams, Michael van der Westhuizen,
Sedat Dilek, x86
> On Jun 1, 2020, at 2:58 PM, Norbert Lange <nolange79@gmail.com> wrote:
>
> The series seems to be stuck in limbo, and I got the hint to bring
> this to Andrew's attention [1].
> Hope this will finally end in upstream, been using these patches for ~2 years.
Thanks for the CC!
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [GIT PULL][PATCH v5 0/8] Add support for ZSTD-compressed kernel and initramfs
2020-06-01 22:01 ` Nick Terrell
@ 2020-06-16 16:27 ` Sedat Dilek
0 siblings, 0 replies; 6+ messages in thread
From: Sedat Dilek @ 2020-06-16 16:27 UTC (permalink / raw)
To: Nick Terrell
Cc: Norbert Lange, Nick Terrell, akpm, Kernel Team, Chris Mason,
gregkh, Kees Cook, Adam Borowski, linux-kbuild, linux-kernel,
mingo, Petr Malat, Patrick Williams, Patrick Williams,
Michael van der Westhuizen, x86
On Tue, Jun 2, 2020 at 12:01 AM Nick Terrell <terrelln@fb.com> wrote:
>
> > On Jun 1, 2020, at 2:58 PM, Norbert Lange <nolange79@gmail.com> wrote:
> >
> > The series seems to be stuck in limbo, and I got the hint to bring
> > this to Andrew's attention [1].
> > Hope this will finally end in upstream, been using these patches for ~2 years.
>
> Thanks for the CC!
Nick can you offer latest zstd (v5) on top of Linux v5.8-rc1, please?
- Sedat -
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [GIT PULL][PATCH v5 0/8] Add support for ZSTD-compressed kernel and initramfs
2020-06-01 21:58 [GIT PULL][PATCH v5 0/8] Add support for ZSTD-compressed kernel and initramfs Norbert Lange
2020-06-01 22:01 ` Nick Terrell
@ 2020-06-01 22:01 ` Sedat Dilek
1 sibling, 0 replies; 6+ messages in thread
From: Sedat Dilek @ 2020-06-01 22:01 UTC (permalink / raw)
To: Norbert Lange
Cc: nickrterrell, akpm, Kernel-team, clm, gregkh, Kees Cook,
kilobyte, linux-kbuild, linux-kernel, mingo, oss, patrick,
patrickw3, rmikey, terrelln, x86
On Mon, Jun 1, 2020 at 11:59 PM Norbert Lange <nolange79@gmail.com> wrote:
>
> The series seems to be stuck in limbo, and I got the hint to bring
> this to Andrew's attention [1].
> Hope this will finally end in upstream, been using these patches for ~2 years.
>
> Regards, Norbert
>
> [1] - https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=955469
Hi Norbert,
I am using v5 since Linux v5.7-rc+ with modification to Debian's
initramfs-tools.
Thanks for bringing this up!
Regards,
- Sedat -
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [GIT PULL][PATCH v5 0/8] Add support for ZSTD-compressed kernel and initramfs
@ 2020-06-02 13:20 Metztli Information Technology
0 siblings, 0 replies; 6+ messages in thread
From: Metztli Information Technology @ 2020-06-02 13:20 UTC (permalink / raw)
To: nolange79
Cc: nickrterrell, akpm, Kernel-team, clm, gregkh, keescook, kilobyte,
linux-kbuild, linux-kernel, mingo, oss, patrick, patrickw3,
rmikey, sedat.dilek, terrelln, x86, reiserfs-devel,
edward.shishkin
On Mon, Jun 1, 2020 at 2:59 PM Norbert Lange <nolange79@gmail.com> wrote:
>
> The series seems to be stuck in limbo, and I got the hint to bring
> this to Andrew's attention [1].
> Hope this will finally end in upstream, been using these patches for ~2 years.
>
> Regards, Norbert
>
> [1] - https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=955469
Began using your patch for Debian Buster backport of 0.136 initramfs-tools, and Nick Terrel's kernel patch for 5.6 -- but modified for 5.5.17-19 in my reiser4 builds -- and set both defaults to zstd.
Thus far, as long as there exists 'a priori' the Zstd package, the combination works in both local and my custom Google cloud instances installations.
Best Professional Regards.
--
Jose R R
http://metztli.it
---------------------------------------------------------------------------------------------
Download Metztli Reiser4: Debian Buster w/ Linux 5.5.19 AMD64
---------------------------------------------------------------------------------------------
feats ZSTD compression https://sf.net/projects/metztli-reiser4/
-------------------------------------------------------------------------------------------
Official current Reiser4 resources: https://reiser4.wiki.kernel.org/
^ permalink raw reply [flat|nested] 6+ messages in thread
* [GIT PULL][PATCH v5 0/8] Add support for ZSTD-compressed kernel and initramfs
@ 2020-04-08 21:57 Nick Terrell
0 siblings, 0 replies; 6+ messages in thread
From: Nick Terrell @ 2020-04-08 21:57 UTC (permalink / raw)
To: Nick Terrell
Cc: linux-kernel, Chris Mason, linux-kbuild, x86, gregkh, Petr Malat,
Kees Cook, Kernel Team, Nick Terrell, Adam Borowski,
Patrick Williams, rmikey, mingo, Patrick Williams, Sedat Dilek
From: Nick Terrell <terrelln@fb.com>
Please pull from
git@github.com:terrelln/linux.git tags/v5-zstd
to get these changes. Alternatively the patchset is included.
Hi all,
This patch set adds support for a ZSTD-compressed kernel, ramdisk, and
initramfs in the kernel boot process. ZSTD-compressed ramdisk and initramfs
are supported on all architectures. The ZSTD-compressed kernel is only
hooked up to x86 in this patch set.
Zstandard requires slightly more memory during the kernel decompression
on x86 (192 KB vs 64 KB), and the memory usage is independent of the
window size.
Zstandard requires memory proprortional to the window size used during
compression for decompressing the ramdisk image, since streaming mode is
used. Newer versions of zstd (1.3.2+) list the window size of a file
with `zstd -lv <file>'. The absolute maximum amount of memory required
is just over 8 MB, but it can be controlled at compression time.
This patch set has been boot tested with buildroot and QEMU based off
of linux-5.6-rc6.
On i386 and x86_64 I have tested the following configurations:
* zstd compressed kernel and a separate zstd compressed initramfs
* zstd compressed kernel and a built-in zstd compressed initramfs
* gzip compressed kernel and a separate gzip compressed initramfs
* gzip compressed kernel and a built-in gzip compressed initramfs
On arm and aarch64 I tested the same configurations, except that the kernel is
always gzip compressed.
Facebook has been using v1 of these patches on x86_64 devices for more than 6
months. When we switched from a xz compressed initramfs to a zstd compressed
initramfs decompression time shrunk from 12 seconds to 3 seconds. When we
switched from a xz compressed kernel to a zstd compressed kernel we saved 2
seconds of boot time.
Facebook has been using v2 of these patches on aarch64 devices for a few weeks.
When we switched from an lzma compressed initramfs to a zstd compressed initramfs
decompression time shrunk from 27 seconds to 8 seconds.
The zstd compressed kernel is smaller than the gzip compressed kernel but larger
than the xz or lzma compressed kernels, and it decompresses faster than
everything except lz4. See the table below for the measurement of an x86_64
kernel ordered by compressed size:
algo size
xz 6,509,792
lzma 6,856,576
zstd 7,399,157
gzip 8,522,527
bzip 8,629,603
lzo 9,808,035
lz4 10,705,570
none 32,565,672
v1 -> v2:
- Rebase
- usr/Makefile and init/Kconfig were changed so the patches were updated
- No functional changes except to rebase
- Split the patches up into smaller chunks
v2 -> v3:
- Add *.zst to the .gitignore in patch 8
- Style nits in patch 3
- Rename the PREBOOT macro to ZSTD_PREBOOT and XXH_PREBOOT in patches
1 through 3
v3 -> v4:
- Increase the ZSTD_IOBUF_SIZE from 4KB to 128KB to improve performance.
With this change I switch from malloc() to large_malloc() for the
buffers.
- Increase the maximum allowed window size from 8 MB to 128 MB, which is
the max that zstd in the kernel supports.
v4 -> v5:
- Update commit message for patch 6 in response to comments
- Rebase onto next-20200408
Best,
Nick Terrell
Adam Borowski (1):
.gitignore: add ZSTD-compressed files
Nick Terrell (7):
lib: prepare zstd for preboot environment
lib: prepare xxhash for preboot environment
lib: add zstd support to decompress
init: add support for zstd compressed kernel
usr: add support for zstd compressed initramfs
x86: bump ZO_z_extra_bytes margin for zstd
x86: Add support for ZSTD compressed kernel
.gitignore | 1 +
Documentation/x86/boot.rst | 6 +-
arch/x86/Kconfig | 1 +
arch/x86/boot/compressed/Makefile | 5 +-
arch/x86/boot/compressed/misc.c | 4 +
arch/x86/boot/header.S | 8 +-
arch/x86/include/asm/boot.h | 6 +-
include/linux/decompress/unzstd.h | 11 +
init/Kconfig | 15 +-
lib/Kconfig | 4 +
lib/Makefile | 1 +
lib/decompress.c | 5 +
lib/decompress_unzstd.c | 342 ++++++++++++++++++++++++++++++
lib/xxhash.c | 21 +-
lib/zstd/decompress.c | 2 +
lib/zstd/fse_decompress.c | 9 +-
lib/zstd/zstd_internal.h | 14 +-
scripts/Makefile.lib | 15 ++
usr/Kconfig | 20 ++
usr/Makefile | 1 +
20 files changed, 464 insertions(+), 27 deletions(-)
create mode 100644 include/linux/decompress/unzstd.h
create mode 100644 lib/decompress_unzstd.c
--
2.26.0
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-06-16 16:27 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-01 21:58 [GIT PULL][PATCH v5 0/8] Add support for ZSTD-compressed kernel and initramfs Norbert Lange
2020-06-01 22:01 ` Nick Terrell
2020-06-16 16:27 ` Sedat Dilek
2020-06-01 22:01 ` Sedat Dilek
-- strict thread matches above, loose matches on Subject: below --
2020-06-02 13:20 Metztli Information Technology
2020-04-08 21:57 Nick Terrell
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).