Skip to content

Speedup LTP compile time by ~20% on multi-machine

Andrea Cervesato ltp 3 versions – In review

Get series with b4
b4 am [email protected] change-id 20261020-build_system_optimize-6cd0343f08e1

Versions newest first

  1. v3 Latest3 patches 6 repliesIn review
  2. v23 patches 2 repliesSuperseded
  3. v11 patch 3 repliesSuperseded

Changes in v3 from the cover letter

- added libs-all ordering to avoid races
- Link to v2: https://lore.kernel.org/[email protected]

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3build: Fix library prerequisites in testcases.mkinclude/mk/testcases.mk testcases/kernel/include/lib.mk+10 -82 replies
2/3build: Build shared libs once on subtree makeinclude/mk/generic_trunk_target.inc+23 -02 replies
3/3build: Parallelize subdirectory recursion in generic_trunk_targetMakefile include/mk/generic_trunk_target.inc testcases/kernel/Makefile +1 more+36 -72 replies

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by.

PatchPetr VorelLi Wang (Hieco)
1/3R-b
2/3
3/3R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [LTP] [PATCH v3 0/3] Speedup LTP compile time by ~20% on multi-machine

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

---
Changes in v3:
- added libs-all ordering to avoid races
- Link to v2: https://lore.kernel.org/[email protected]

Changes in v2:
- fix build race condition
- Link to v1: https://lore.kernel.org/[email protected]

---
Andrea Cervesato (3):
build: Fix library prerequisites in testcases.mk
build: Build shared libs once on subtree make
build: Parallelize subdirectory recursion in generic_trunk_target

 Makefile                            |  2 ++
 include/mk/generic_trunk_target.inc | 58 ++++++++++++++++++++++++++++++++-----
 include/mk/testcases.mk             | 14 +++++----
 testcases/kernel/Makefile           |  3 ++
 testcases/kernel/include/lib.mk     |  4 +--
 testcases/network/rpc/Makefile      |  3 ++
 6 files changed, 69 insertions(+), 15 deletions(-)

---
base-commit: 121876b3da3ff59b0dd17b4798b2e4699ba431d1
change-id: 20261020-build_system_optimize-6cd0343f08e1

Best regards,

Signature · 5 lines
Andrea Cervesato <[email protected]>


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp