From: "Lorenzo Stoakes (ARM)" <ljs@kernel.org>
To: sashiko-reviews@lists.linux.dev
Cc: ojeda@kernel.org
Subject: Re: [PATCH 20/23] kbuild: rust: parallelise rustc front end
Date: Sun, 13 Sep 2026 20:02:15 +0100 [thread overview]
Message-ID: <aqby2K6mddww50_U@gremlin> (raw)
In-Reply-To: <20260908212035.010861F00A3A@smtp.kernel.org>
On Tue, Sep 08, 2026 at 09:20:34PM +0000, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [Medium] Unconditionally passing `-j8` or `-Zthreads=8` to `rustc` breaks single-threaded Make invocations (e.g., `make -j1` or simply `make`), forcing an 8-thread pool and creating an OOM risk.
> --
>
> commit 31e6e028120fc1bff9382e6014058f3d1bbcb274
> Author: Lorenzo Stoakes (ARM) <ljs@kernel.org>
>
> kbuild: rust: parallelise rustc front end
>
> This commit adds parallelization flags (-j or -Zthreads) to the rustc
> invocation for Rust kernel code. It uses Kconfig checks to detect compiler
> support and applies an 8-thread default to speed up the Rust frontend build
> process.
>
> > diff --git a/Makefile b/Makefile
> > index 997fc7ebe0965..7d23d7b64be33 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -1204,6 +1204,10 @@ KBUILD_RUSTFLAGS += --remap-path-prefix=$(srcroot)/= --remap-path-scope=macro
> > endif
> > endif
> >
> > +ifdef CONFIG_RUST
> > +KBUILD_RUSTFLAGS += $(if $(CONFIG_RUSTC_HAS_JOBS),-j8,$(if $(CONFIG_RUSTC_HAS_ZTHREADS),-Zthreads=8))
>
> [Severity: Medium]
> Does unconditionally passing -j8 or -Zthreads=8 to rustc break
> single-threaded Make invocations (e.g. "make -j1" or just "make")?
>
> It appears this might override Make's job controls and force an 8-thread
> pool even when no jobserver is present. On resource-constrained systems
> where users intentionally use "make -j1" to limit the RAM footprint, could
> this significantly increase memory consumption per rustc invocation and
> cause an out-of-memory error during the build?
No, when a jobserver is present it doesn't override that.
When -j1 yes it will, but the memory delta is small, a few hundred megabytes
(~1.1 GiB vs. 1.4 GiB).
So it doesn't seem to be real world issue.
>
> > +endif
> > +
> > # include additional Makefiles when needed
> > include-y := scripts/Makefile.warn
>
> --
> Sashiko AI review · https://sashiko.dev/#/patchset/20260908-build-speedup-v1-0-5dc1ac01672d@kernel.org?part=20
--
Cheers, Lorenzo
next prev parent reply other threads:[~2026-09-13 19:02 UTC|newest]
Thread overview: 219+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-08 20:55 [PATCH 00/23] kbuild: significantly speed up kernel builds Lorenzo Stoakes (ARM)
2026-09-08 20:55 ` Lorenzo Stoakes (ARM)
2026-09-08 20:55 ` [PATCH 01/23] scripts/mksysmap: drop the MODULE_INFO() symbols from kallsyms Lorenzo Stoakes (ARM)
2026-09-08 20:55 ` Lorenzo Stoakes (ARM)
2026-09-09 19:47 ` Nicolas Schier
2026-09-09 19:47 ` Nicolas Schier
2026-09-10 11:00 ` Lorenzo Stoakes (ARM)
2026-09-10 11:00 ` Lorenzo Stoakes (ARM)
2026-09-10 4:19 ` Nathan Chancellor
2026-09-10 4:19 ` Nathan Chancellor
2026-09-10 11:03 ` Lorenzo Stoakes (ARM)
2026-09-10 11:03 ` Lorenzo Stoakes (ARM)
2026-09-10 19:00 ` Nicolas Schier
2026-09-10 19:00 ` Nicolas Schier
2026-09-08 20:55 ` [PATCH 02/23] scripts/mksysmap: fix escape of '$' in the __pi_ pattern Lorenzo Stoakes (ARM)
2026-09-08 20:55 ` Lorenzo Stoakes (ARM)
2026-09-09 19:47 ` Nicolas Schier
2026-09-09 19:47 ` Nicolas Schier
2026-09-10 11:04 ` Lorenzo Stoakes (ARM)
2026-09-10 11:04 ` Lorenzo Stoakes (ARM)
2026-09-10 4:19 ` Nathan Chancellor
2026-09-10 4:19 ` Nathan Chancellor
2026-09-10 11:21 ` Lorenzo Stoakes (ARM)
2026-09-10 11:21 ` Lorenzo Stoakes (ARM)
2026-09-10 19:00 ` Nicolas Schier
2026-09-10 19:00 ` Nicolas Schier
2026-09-08 20:55 ` [PATCH 03/23] kallsyms: index symbols by token to speed up table compression Lorenzo Stoakes (ARM)
2026-09-08 20:55 ` Lorenzo Stoakes (ARM)
2026-09-08 20:55 ` [PATCH 04/23] kallsyms: output binary data to speed output and kallsyms assembly Lorenzo Stoakes (ARM)
2026-09-08 20:55 ` Lorenzo Stoakes (ARM)
2026-09-09 14:35 ` Linus Torvalds
2026-09-09 14:35 ` Linus Torvalds
2026-09-14 8:39 ` Lorenzo Stoakes (ARM)
2026-09-14 8:39 ` Lorenzo Stoakes (ARM)
2026-09-14 8:57 ` Lorenzo Stoakes (ARM)
2026-09-14 8:57 ` Lorenzo Stoakes (ARM)
2026-09-10 9:29 ` David Laight
2026-09-10 9:29 ` David Laight
2026-09-11 11:07 ` Lorenzo Stoakes (ARM)
2026-09-11 11:07 ` Lorenzo Stoakes (ARM)
2026-09-12 6:38 ` [4/23] " Markus Elfring
2026-09-12 6:38 ` Markus Elfring
[not found] ` <20260908211043.D350C1F00A3A@smtp.kernel.org>
2026-09-13 17:05 ` [PATCH 04/23] " Lorenzo Stoakes (ARM)
2026-09-08 20:55 ` [PATCH 05/23] kbuild: do not sort nm output where the order is irrelevant Lorenzo Stoakes (ARM)
2026-09-08 20:55 ` Lorenzo Stoakes (ARM)
2026-09-10 4:19 ` Nathan Chancellor
2026-09-10 4:19 ` Nathan Chancellor
2026-09-08 20:55 ` [PATCH 06/23] kbuild: only emit vmlinux relocations when required Lorenzo Stoakes (ARM)
2026-09-08 20:55 ` Lorenzo Stoakes (ARM)
2026-09-10 4:19 ` Nathan Chancellor
2026-09-10 4:19 ` Nathan Chancellor
2026-09-13 19:33 ` Lorenzo Stoakes (ARM)
2026-09-13 19:33 ` Lorenzo Stoakes (ARM)
[not found] ` <20260908211205.156371F00A3A@smtp.kernel.org>
2026-09-13 17:20 ` Lorenzo Stoakes (ARM)
2026-09-08 20:55 ` [PATCH 07/23] elf-parse: add section flags, symbol binding and a read-only mapping Lorenzo Stoakes (ARM)
2026-09-08 20:55 ` Lorenzo Stoakes (ARM)
2026-09-08 20:55 ` [PATCH 08/23] kallsyms: reimplement mksysmap in C Lorenzo Stoakes (ARM)
2026-09-08 20:55 ` Lorenzo Stoakes (ARM)
2026-09-11 18:52 ` Markus Elfring
2026-09-11 18:52 ` Markus Elfring
2026-09-11 19:15 ` Markus Elfring
2026-09-11 19:15 ` Markus Elfring
2026-09-11 19:42 ` Markus Elfring
2026-09-11 19:42 ` Markus Elfring
2026-09-08 20:55 ` [PATCH 09/23] kbuild: do not allocate .modinfo in vmlinux Lorenzo Stoakes (ARM)
2026-09-08 20:55 ` Lorenzo Stoakes (ARM)
2026-09-10 4:19 ` Nathan Chancellor
2026-09-10 4:19 ` Nathan Chancellor
2026-09-10 10:59 ` Lorenzo Stoakes (ARM)
2026-09-10 10:59 ` Lorenzo Stoakes (ARM)
2026-09-08 20:55 ` [PATCH 10/23] kbuild: cache list, composite object state per object Lorenzo Stoakes (ARM)
2026-09-08 20:55 ` Lorenzo Stoakes (ARM)
2026-09-08 20:55 ` [PATCH 11/23] kbuild: implement and use depcheck to check dependency timestamps Lorenzo Stoakes (ARM)
2026-09-08 20:55 ` Lorenzo Stoakes (ARM)
2026-09-09 15:26 ` Linus Torvalds
2026-09-09 15:26 ` Linus Torvalds
2026-09-14 8:28 ` Lorenzo Stoakes (ARM)
2026-09-14 8:28 ` Lorenzo Stoakes (ARM)
[not found] ` <20260908211038.2846F1F00A3A@smtp.kernel.org>
2026-09-13 17:47 ` Lorenzo Stoakes (ARM)
2026-09-08 20:55 ` [PATCH 12/23] kbuild: avoid re-running compiler and linker probes Lorenzo Stoakes (ARM)
2026-09-08 20:55 ` Lorenzo Stoakes (ARM)
2026-09-10 4:19 ` Nathan Chancellor
2026-09-10 4:19 ` Nathan Chancellor
2026-09-10 15:42 ` Nicolas Schier
2026-09-10 15:42 ` Nicolas Schier
2026-09-11 10:30 ` Lorenzo Stoakes (ARM)
2026-09-11 10:30 ` Lorenzo Stoakes (ARM)
2026-09-11 18:10 ` Nicolas Schier
2026-09-11 18:10 ` Nicolas Schier
2026-09-11 18:25 ` Lorenzo Stoakes (ARM)
2026-09-11 18:25 ` Lorenzo Stoakes (ARM)
2026-09-11 17:33 ` David Laight
2026-09-11 17:33 ` David Laight
2026-09-11 18:17 ` Nicolas Schier
2026-09-11 18:17 ` Nicolas Schier
2026-09-11 18:24 ` Lorenzo Stoakes (ARM)
2026-09-11 18:24 ` Lorenzo Stoakes (ARM)
2026-09-11 19:34 ` Nicolas Schier
2026-09-11 19:34 ` Nicolas Schier
2026-09-11 21:01 ` David Laight
2026-09-11 21:01 ` David Laight
2026-09-12 7:11 ` Nathan Chancellor
2026-09-12 7:11 ` Nathan Chancellor
2026-09-13 20:02 ` Lorenzo Stoakes (ARM)
2026-09-13 20:02 ` Lorenzo Stoakes (ARM)
2026-09-11 10:26 ` Lorenzo Stoakes (ARM)
2026-09-11 10:26 ` Lorenzo Stoakes (ARM)
2026-09-12 6:51 ` Nathan Chancellor
2026-09-12 6:51 ` Nathan Chancellor
2026-09-12 10:03 ` David Laight
2026-09-12 10:03 ` David Laight
2026-09-08 20:55 ` [PATCH 13/23] modpost: hash module source per-file, not per-byte Lorenzo Stoakes (ARM)
2026-09-08 20:55 ` Lorenzo Stoakes (ARM)
2026-09-10 12:52 ` Petr Pavlu
2026-09-10 12:52 ` Petr Pavlu
2026-09-11 10:41 ` Lorenzo Stoakes (ARM)
2026-09-11 10:41 ` Lorenzo Stoakes (ARM)
2026-09-11 11:57 ` Petr Pavlu
2026-09-11 11:57 ` Petr Pavlu
2026-09-11 12:21 ` Lorenzo Stoakes (ARM)
2026-09-11 12:21 ` Lorenzo Stoakes (ARM)
2026-09-08 20:55 ` [PATCH 14/23] modpost: cache section relocation mismatch state Lorenzo Stoakes (ARM)
2026-09-08 20:55 ` Lorenzo Stoakes (ARM)
2026-09-08 20:55 ` [PATCH 15/23] modpost: emit module descriptors as assembly Lorenzo Stoakes (ARM)
2026-09-08 20:55 ` Lorenzo Stoakes (ARM)
2026-09-09 14:59 ` Linus Torvalds
2026-09-09 14:59 ` Linus Torvalds
2026-09-14 8:50 ` Lorenzo Stoakes (ARM)
2026-09-14 8:50 ` Lorenzo Stoakes (ARM)
[not found] ` <20260908211828.819701F00A3A@smtp.kernel.org>
2026-09-13 18:13 ` Lorenzo Stoakes (ARM)
2026-09-08 20:55 ` [PATCH 16/23] kbuild: batch module finalisation Lorenzo Stoakes (ARM)
2026-09-08 20:55 ` Lorenzo Stoakes (ARM)
2026-09-10 15:48 ` Nicolas Schier
2026-09-10 15:48 ` Nicolas Schier
2026-09-11 10:23 ` Lorenzo Stoakes (ARM)
2026-09-11 10:23 ` Lorenzo Stoakes (ARM)
[not found] ` <20260908211822.C97E01F00A3A@smtp.kernel.org>
2026-09-13 18:14 ` Lorenzo Stoakes (ARM)
2026-09-08 20:55 ` [PATCH 17/23] modpost: perform srcversion hashing in parallel Lorenzo Stoakes (ARM)
2026-09-08 20:55 ` Lorenzo Stoakes (ARM)
2026-09-10 10:32 ` David Laight
2026-09-10 10:32 ` David Laight
2026-09-11 10:49 ` Lorenzo Stoakes (ARM)
2026-09-11 10:49 ` Lorenzo Stoakes (ARM)
2026-09-12 11:50 ` Yann Droneaud
2026-09-12 11:50 ` Yann Droneaud
2026-09-13 16:36 ` Lorenzo Stoakes (ARM)
2026-09-13 16:36 ` Lorenzo Stoakes (ARM)
2026-09-08 20:55 ` [PATCH 18/23] objtool: cache relocations and function dead end state, do less work Lorenzo Stoakes (ARM)
2026-09-08 20:55 ` Lorenzo Stoakes (ARM)
2026-09-12 22:47 ` Josh Poimboeuf
2026-09-12 22:47 ` Josh Poimboeuf
2026-09-13 20:28 ` Lorenzo Stoakes (ARM)
2026-09-13 20:28 ` Lorenzo Stoakes (ARM)
2026-09-08 20:55 ` [PATCH 19/23] objtool: decode instructions and resolve branch targets in parallel Lorenzo Stoakes (ARM)
2026-09-08 20:55 ` Lorenzo Stoakes (ARM)
2026-09-12 23:39 ` Josh Poimboeuf
2026-09-12 23:39 ` Josh Poimboeuf
2026-09-13 16:23 ` Lorenzo Stoakes (ARM)
2026-09-13 16:23 ` Lorenzo Stoakes (ARM)
[not found] ` <20260908212532.90D9A1F00A3A@smtp.kernel.org>
2026-09-13 18:53 ` Lorenzo Stoakes (ARM)
2026-09-08 20:55 ` [PATCH 20/23] kbuild: rust: parallelise rustc front end Lorenzo Stoakes (ARM)
2026-09-08 20:55 ` Lorenzo Stoakes (ARM)
2026-09-08 21:13 ` Miguel Ojeda
2026-09-08 21:13 ` Miguel Ojeda
2026-09-09 14:22 ` Lorenzo Stoakes (ARM)
2026-09-09 14:22 ` Lorenzo Stoakes (ARM)
2026-09-09 10:22 ` Björn Baron
2026-09-09 10:22 ` Björn Baron
2026-09-09 12:59 ` Miguel Ojeda
2026-09-09 12:59 ` Miguel Ojeda
2026-09-09 14:26 ` Lorenzo Stoakes (ARM)
2026-09-09 14:26 ` Lorenzo Stoakes (ARM)
2026-09-10 12:25 ` Nicolas Schier (FRITZ!)
2026-09-10 12:25 ` Nicolas Schier (FRITZ!)
2026-09-11 19:00 ` Nicolas Schier
2026-09-11 19:00 ` Nicolas Schier
2026-09-13 21:30 ` Lorenzo Stoakes (ARM)
2026-09-13 21:30 ` Lorenzo Stoakes (ARM)
[not found] ` <20260908212035.010861F00A3A@smtp.kernel.org>
2026-09-13 19:02 ` Lorenzo Stoakes (ARM) [this message]
2026-09-08 20:55 ` [PATCH 21/23] rust: make exports.o depend on the headers generated for it Lorenzo Stoakes (ARM)
2026-09-08 20:55 ` Lorenzo Stoakes (ARM)
2026-09-08 20:55 ` [PATCH 22/23] kbuild: build rust crates in parallel with the rest of the build Lorenzo Stoakes (ARM)
2026-09-08 20:55 ` Lorenzo Stoakes (ARM)
[not found] ` <20260908214335.1C52F1F00A3A@smtp.kernel.org>
2026-09-13 19:09 ` Lorenzo Stoakes (ARM)
2026-09-08 20:55 ` [PATCH 23/23] kbuild: use pigz for gzip compression if available Lorenzo Stoakes (ARM)
2026-09-08 20:55 ` Lorenzo Stoakes (ARM)
2026-09-10 4:19 ` Nathan Chancellor
2026-09-10 4:19 ` Nathan Chancellor
2026-09-11 11:03 ` Lorenzo Stoakes (ARM)
2026-09-11 11:03 ` Lorenzo Stoakes (ARM)
2026-09-12 6:38 ` Nathan Chancellor
2026-09-12 6:38 ` Nathan Chancellor
2026-09-13 19:31 ` Lorenzo Stoakes (ARM)
2026-09-13 19:31 ` Lorenzo Stoakes (ARM)
[not found] ` <20260908212045.A3E6D1F00A3A@smtp.kernel.org>
2026-09-13 19:13 ` Lorenzo Stoakes (ARM)
2026-09-08 21:06 ` [PATCH 00/23] kbuild: significantly speed up kernel builds Nick Desaulniers
2026-09-08 21:06 ` Nick Desaulniers
2026-09-09 14:17 ` Lorenzo Stoakes (ARM)
2026-09-09 14:17 ` Lorenzo Stoakes (ARM)
2026-09-09 22:09 ` Nick Desaulniers
2026-09-09 22:09 ` Nick Desaulniers
2026-09-11 11:25 ` Lorenzo Stoakes (ARM)
2026-09-11 11:25 ` Lorenzo Stoakes (ARM)
2026-09-09 15:37 ` Linus Torvalds
2026-09-09 15:37 ` Linus Torvalds
2026-09-09 16:30 ` Lorenzo Stoakes (ARM)
2026-09-09 16:30 ` Lorenzo Stoakes (ARM)
2026-09-09 21:58 ` Florian Fainelli
2026-09-09 21:58 ` Florian Fainelli
2026-09-11 11:28 ` Lorenzo Stoakes (ARM)
2026-09-11 11:28 ` Lorenzo Stoakes (ARM)
2026-09-12 6:44 ` Nathan Chancellor
2026-09-12 6:44 ` Nathan Chancellor
2026-09-13 16:27 ` Lorenzo Stoakes (ARM)
2026-09-13 16:27 ` Lorenzo Stoakes (ARM)
2026-09-10 4:19 ` Nathan Chancellor
2026-09-10 4:19 ` Nathan Chancellor
2026-09-11 11:13 ` Lorenzo Stoakes (ARM)
2026-09-11 11:13 ` Lorenzo Stoakes (ARM)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aqby2K6mddww50_U@gremlin \
--to=ljs@kernel.org \
--cc=ojeda@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.