Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linux kernel: prefer zstd where possible #302300

Merged
merged 2 commits into from
May 8, 2024
Merged

Commits on Apr 19, 2024

  1. linux kernel: prefer zstd where possible

    Closes NixOS#302291
    Closes NixOS#301536
    
    The following things have changed:
    
    * For 5.7+: ZSWAP compressor uses zstd now.
    * For 5.11+: ZRAM compressor uses zstd now.
    * For 5.13+: kernel modules are compressed with zstd instead of xz.
    * For 5.19+: support zstd-compressed firmware.
    
    The modules-closure functionality needed explicit support for copying
    over `.zst` files. Also, the VM image builder used busybox's `insmod`
    before which doesn't support zstd. Switched to `kmod` and added xz/zstd
    as dependencies for it, similar to how it's done for the actual stage1
    in d33e52b. The use of `kmod` here
    doesn't seem to be such a big deal since it's only a build-time
    dependency.
    Ma27 committed Apr 19, 2024
    Configuration menu
    Copy the full SHA
    378177d View commit details
    Browse the repository at this point in the history
  2. nixos/udev: compress firmware with zstd if possible

    Closes NixOS#267442
    
        $ nix path-info -Sh /nix/store/qj1dm7wfw5m3mxf1gn3fdm0az9y1h5ny-linux-firmware-20240312-xz
        /nix/store/qj1dm7wfw5m3mxf1gn3fdm0az9y1h5ny-linux-firmware-20240312-xz	440.3M
        $ nix path-info -Sh /nix/store/c3szcjxb3g990dbiz7llwmkaf0bi98j2-linux-firmware-20240312-zstd
        /nix/store/c3szcjxb3g990dbiz7llwmkaf0bi98j2-linux-firmware-20240312-zstd	460.6M
    
    This is an increase of 4.4%, but OTOH zstd has a significantly higher
    decompression speed[1].
    
    [1] https://gregoryszorc.com/blog/2017/03/07/better-compression-with-zstandard/
    Ma27 committed Apr 19, 2024
    Configuration menu
    Copy the full SHA
    b6ef9ff View commit details
    Browse the repository at this point in the history