mirror of https://lore.kernel.org/lkml/
 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
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ 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] 4+ messages in thread

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

Thread overview: 4+ 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®