All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] kbuild: reduce single-build dependencies
@ 2026-11-11 13:41 Vincent Mailhol
  2026-11-11 13:41 ` [PATCH 1/3] kbuild: make rq-offsets-file an explicit preparation dependency Vincent Mailhol
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Vincent Mailhol @ 2026-11-11 13:41 UTC (permalink / raw)
  To: Nathan Chancellor, Nicolas Schier
  Cc: linux-kernel, linux-kbuild, Vincent Mailhol

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>


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-11-24  7:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH 0/3] kbuild: reduce single-build dependencies Nicolas Schier

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.