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

From: Kees Cook

Date: Mon Sep 14 2026 - 14:08:13 EST


On Mon, Sep 14, 2026 at 09:49:50AM -0700, H. Peter Anvin wrote:
> On September 14, 2026 9:39:07 AM PDT, Kees Cook <kees@xxxxxxxxxx> wrote:
> [...]
> >diff --git a/tools/lib/python/jobserver.py b/tools/lib/python/jobserver.py
> >index 0b1ffdf9f7a3..fc38c5020b22 100755
> >--- a/tools/lib/python/jobserver.py
> >+++ b/tools/lib/python/jobserver.py
> >@@ -29,6 +29,11 @@ $claim child to do the actual work.
> > The end goal here is to keep the total number of build tasks under the
> > limit established by the initial ``make -j$n_proc`` call.
> >
> >+Setting the ``SINGLE_THREADED`` environment variable skips the reservation
> >+entirely and runs the command with ``PARALLELISM=1``. This is meant for callers
> >+that run many short commands in parallel themselves, where each one should use
> >+only the job slot it already holds.
> >+
> > See:
> > https://www.gnu.org/software/make/manual/html_node/POSIX-Jobserver.html#POSIX-Jobserver
> > """
> >@@ -68,6 +73,13 @@ class JobserverExec:
> > self.is_open = True # We only try once
> > self.claim = None
> > #
> >+ # SINGLE_THREADED asks for no reservation at all: the command runs
> >+ # with PARALLELISM=1, using only the slot its caller already holds.
> >+ #
> >+ if os.environ.get('SINGLE_THREADED'):
> >+ self.claim = 1
> >+ return
> >+ #
> > # Check the make flags for "--jobserver=R,W"
> > # Note that GNU Make has used --jobserver-fds and --jobserver-auth
> > # so this handles all of them.
> >
>
> If we are going to add dependencies, can we add *any* scripting language that is less stone tablet than POSIX awk?

What are you referring to here? The jobserver logic is all Python.

--
Kees Cook