[PATCH v2 21/21] kbuild: use pigz for gzip compression if available

Lorenzo Stoakes (ARM) ljs at kernel.org
Wed Sep 16 08:08:22 PDT 2026


On Wed, Sep 16, 2026 at 08:38:33AM +0200, Arnd Bergmann wrote:
> On Wed, Sep 16, 2026, at 03:06, Kees Cook wrote:
> > On Mon, Sep 14, 2026 at 10:22:20AM +0100, Lorenzo Stoakes (ARM) wrote:
> >
> > Makefile:
> >
> > KPGZIP	:= $(if $(shell command -v pigz 2>/dev/null),$(PYTHON3)
> > $(abs_srctree)/scripts/jobserver-exec
> > $(abs_srctree)/scripts/parallel-gzip,gzip)
> >
> > and the same scripts/parallel-gzip:
> >
> > 	#!/bin/sh
> > 	exec pigz -p ${PARALLELISM:-1} "$@"
> >
> > And then replace the /boot/ KGZIP uses with KPGZIP. Then we don't need
> > to change modules, config_data, new users, nor cmd_gzip, etc, which all
> > continue to use the regular KGZIP and the "use python" part for the
> > KPGZIP case becomes is a 1-time cost?
>
> Nice, I like the idea and this this will work. I didn't know about
> scripts/jobserver-exec, but this does seem like a perfect fit.

Agreed, this solution balances everything well!

>
> I checked the other compression tools we support, and found that
> zstd is another one that has built-in support for parallel
> compression, so we probably want to have it there as well.

Nice, zstd really seems a lot better than gzip in general, but people
default out of habit I guess :)

I think one for a follow-up though?

>
>      Arnd

--
Cheers, Lorenzo



More information about the linux-riscv mailing list