From: "Li Wang (Hieco)" <li.wang@linux.dev>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v4 0/3] Speedup LTP compile time by ~20% on multi-machine
Date: Tue, 24 Nov 2026 17:06:30 +0800 [thread overview]
Message-ID: <20261124090633.840656-1-li.wang@linux.dev> (raw)
The following results show how this optimization moves compile times
really far from what we have now. With a single threaded build, LTP
would take approximately 12 minutes to compile. With a multi-threaded
build on 16 CPUs, this drops down to ~46 seconds.
time make -j16
Executed in 45.96 secs fish external
usr time 519.11 secs 0.24 millis 519.11 secs
sys time 167.13 secs 1.08 millis 167.13 secs
Signed-off-by: Andrea Cervesato <andrea.cervesato@suse.com>
---
Changes in v4:
- Mark library targets .PHONY so library source changes are rebuilt
- Also build libkerntest.a when make is run from testcases/
- Remove the old $(LIBLTP) rule from testcases.mk (overriding recipe warning)
- Refactoring the patchset in clean code
- Link to v3: https://lore.kernel.org/all/20261021-build_system_optimize-v3-0-71a3c4c6f937@suse.com/
Changes in v3:
- added libs-all ordering to avoid races
- Link to v2: https://lore.kernel.org/20261020-build_system_optimize-v2-0-b527ac7cf835@suse.com
Changes in v2:
- fix build race condition
- Link to v1: https://lore.kernel.org/20261020-build_system_optimize-v1-1-744f9fa88908@suse.com
Andrea Cervesato (2):
build: Fix library prerequisites in testcases.mk
build: Build shared libraries once when make runs in testcases/
Li Wang (Hieco) (1):
build: Recurse into trunk subdirectories in parallel
Makefile | 2 ++
include/mk/generic_leaf_target.inc | 2 ++
include/mk/generic_lib_deps.inc | 34 ++++++++++++++++++++++++
include/mk/generic_trunk_target.inc | 40 ++++++++++++++++++++++++-----
include/mk/testcases.mk | 15 +++++------
testcases/kernel/Makefile | 6 +++++
testcases/kernel/include/lib.mk | 6 +++--
testcases/network/rpc/Makefile | 5 ++++
8 files changed, 93 insertions(+), 17 deletions(-)
create mode 100644 include/mk/generic_lib_deps.inc
--
2.56.1
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next reply other threads:[~2026-11-24 9:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-24 9:06 Li Wang (Hieco) [this message]
2026-11-24 9:06 ` [LTP] [PATCH v4 1/3] build: Fix library prerequisites in testcases.mk Li Wang (Hieco)
2026-11-24 9:06 ` [LTP] [PATCH v4 2/3] build: Build shared libraries once when make runs in testcases/ Li Wang (Hieco)
2026-11-24 9:06 ` [LTP] [PATCH v4 3/3] build: Recurse into trunk subdirectories in parallel Li Wang (Hieco)
2026-11-24 11:32 ` [LTP] [PATCH v4 0/3] Speedup LTP compile time by ~20% on multi-machine Cyril Hrubis
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=20261124090633.840656-1-li.wang@linux.dev \
--to=li.wang@linux.dev \
--cc=ltp@lists.linux.it \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox