summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2014-04-09 18:16:58 +0000
committerdim <dim@FreeBSD.org>2014-04-09 18:16:58 +0000
commitb4a5074609596d4c75b32b490d963dc14253a22c (patch)
tree4b992e8161752c70ae2b6d92e7d5fdbf5ce3e021 /sbin
parentfa4bb9196626b91d892d8087912e76ef97bd6f81 (diff)
downloadFreeBSD-src-b4a5074609596d4c75b32b490d963dc14253a22c.zip
FreeBSD-src-b4a5074609596d4c75b32b490d963dc14253a22c.tar.gz
MFC r263778:
Add a SUBDIR_PARALLEL option to bsd.subdir.mk, to allow make to process all the SUBDIR entries in parallel, instead of serially. Apply this option to a selected number of Makefiles, which can greatly speed up the build on multi-core machines, when using make -j. This can be extended to more Makefiles later on, whenever they are verified to work correctly with parallel building. I tested this on a 24-core machine, with make -j48 buildworld (N = 6): before stddev after stddev ======= ====== ======= ====== real time 1741.1 16.5 959.8 2.7 user time 12468.7 16.4 14393.0 16.8 sys time 1825.0 54.8 2110.6 22.8 (user+sys)/real 8.2 17.1 E.g. the build was approximately 45% faster in real time. On machines with less cores, or with lower -j settings, the speedup will not be as impressive. But at least you can now almost max out a machine with buildworld! Submitted by: jilles MFC r263833: Enable parallel building for gnu/usr.bin and usr.bin/clang too.
Diffstat (limited to 'sbin')
-rw-r--r--sbin/Makefile2
1 files changed, 2 insertions, 0 deletions
diff --git a/sbin/Makefile b/sbin/Makefile
index 4772844..c6c3786 100644
--- a/sbin/Makefile
+++ b/sbin/Makefile
@@ -118,4 +118,6 @@ SUBDIR+= routed
SUBDIR:= ${SUBDIR:O}
+SUBDIR_PARALLEL=
+
.include <bsd.subdir.mk>
OpenPOWER on IntegriCloud