All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Schier <nsc@kernel.org>
To: Vincent Mailhol <mailhol@kernel.org>
Cc: Nathan Chancellor <nathan@kernel.org>,
	linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org
Subject: Re: [PATCH 0/3] kbuild: reduce single-build dependencies
Date: Mon, 23 Nov 2026 17:53:23 +0100	[thread overview]
Message-ID: <awRvg0ehHuF7aA56@levanger> (raw)
In-Reply-To: <20261111-reduce-single-build-dependencies-v1-0-7196ca986a85@kernel.org>

On Wed, Nov 11, 2026 at 02:41:02PM +0100, Vincent Mailhol wrote:
> Building a single .o file depends on the prepare target which contains a
> lot of dependencies. Some of those preparation dependencies are not
> needed for a single .o build.
> 
> This is a small annoyance because a modification of the compilation
> flags causes several prepare dependencies to rebuild. Consequently,
> single-build incurs an artificial penalty.
> 
> Move the generic preparation checks and scripts/mod out of the
> single-build preparation path. The first patch is a preparation change
> to make rq-offsets-file an explicit prepare dependency. The second
> addresses missing-syscalls check and atomic-checks. The third and last
> patch addresses scripts/mod.
> 
> == Illustration ==
> 
> These are the build steps triggered when changing the compilation
> flags (here: adding W=1).
> 
> Before this series...
> 
>   $ time make W=1 init/main.o
>     CC      scripts/mod/empty.o
>     MKELF   scripts/mod/elfconfig.h
>     HOSTCC  scripts/mod/modpost.o
>     CC      scripts/mod/devicetable-offsets.s
>     HOSTCC  scripts/mod/file2alias.o
>     HOSTCC  scripts/mod/sumversion.o
>     HOSTCC  scripts/mod/symsearch.o
>     HOSTLD  scripts/mod/modpost
>     CC      kernel/bounds.s
>     CC      arch/x86/kernel/asm-offsets.s
>     CC      kernel/sched/rq-offsets.s
>     CALL    scripts/checksyscalls.sh 
>     DESCEND objtool
>     CC      init/main.o
>   
>   real	0m3.603s
>   user	0m2.839s
>   sys	0m0.959s
> 
> ... and after:
> 
>   $ time make W=1 init/main.o
>     CC      kernel/bounds.s
>     CC      arch/x86/kernel/asm-offsets.s
>     CC      kernel/sched/rq-offsets.s
>     DESCEND objtool
>     CC      init/main.o
>   
>   real	0m2.060s
>   user	0m1.505s
>   sys	0m0.732s
> 
> (done on an x86_64 cpu).
> 
> Signed-off-by: Vincent Mailhol <mailhol@kernel.org>
> ---
> Vincent Mailhol (3):
>       kbuild: make rq-offsets-file an explicit preparation dependency
>       kbuild: move preparation checks out of single-build
>       kbuild: move scripts/mod target out of single-build
> 
>  Kbuild   |  7 +++++--
>  Makefile | 11 +++++++----
>  2 files changed, 12 insertions(+), 6 deletions(-)
> ---
> base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
> change-id: 20261111-reduce-single-build-dependencies-966646f25a0c
> 
> Best regards,
> --  
> Vincent Mailhol <mailhol@kernel.org>

Thanks!

Reviewed-by: Nicolas Schier <nsc@kernel.org>

-- 
Nicolas

      parent reply	other threads:[~2026-11-23 16:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-11 13:41 [PATCH 0/3] kbuild: reduce single-build dependencies Vincent Mailhol
2026-11-11 13:41 ` [PATCH 1/3] kbuild: make rq-offsets-file an explicit preparation dependency Vincent Mailhol
2026-11-11 13:41 ` [PATCH 2/3] kbuild: move preparation checks out of single-build Vincent Mailhol
2026-11-11 13:41 ` [PATCH 3/3] kbuild: move scripts/mod target " Vincent Mailhol
2026-11-12 13:45   ` sashiko-bot
2026-11-23 16:52     ` Nicolas Schier
2026-11-24  7:24       ` Vincent Mailhol
2026-11-23 16:53 ` Nicolas Schier [this message]

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=awRvg0ehHuF7aA56@levanger \
    --to=nsc@kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mailhol@kernel.org \
    --cc=nathan@kernel.org \
    /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.