Skip to content

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

Li Wang (Hieco) ltp 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v4 Latest3 patches 1 replyIn review

Changes in v4 from the cover letter

- 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/[email protected]/

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3build: Fix library prerequisites in testcases.mkinclude/mk/testcases.mk testcases/kernel/include/lib.mk+10 -80 replies
2/3build: Build shared libraries once when make runs in testcases/include/mk/generic_leaf_target.inc include/mk/generic_lib_deps.inc include/mk/generic_trunk_target.inc +2 more+47 -40 replies
3/3build: Recurse into trunk subdirectories in parallelMakefile include/mk/generic_trunk_target.inc testcases/kernel/Makefile +1 more+38 -70 replies

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchLi Wang (Hieco)
1/3R-b
2/3
3/3

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

Read the v4 thread

Cover letter [LTP] [PATCH v4 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 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/[email protected]/

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 (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
Signature · 5 lines
2.56.1


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