]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/commit
MFC r263778:
authordim <dim@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 9 Apr 2014 18:16:58 +0000 (18:16 +0000)
committerdim <dim@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 9 Apr 2014 18:16:58 +0000 (18:16 +0000)
commite089371c3ad0f04dce948d3d5478c44a3906b45d
tree873597a88764ce418705115b9e5f4810b82e9ac4
parentd7b75363d3e0dfe5e286ed6b9a8f261e07a38d0f
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.

git-svn-id: svn://svn.freebsd.org/base/stable/9@264303 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
bin/Makefile
gnu/usr.bin/Makefile
lib/Makefile
lib/clang/Makefile
sbin/Makefile
share/mk/bsd.subdir.mk
usr.bin/Makefile
usr.bin/clang/Makefile
usr.sbin/Makefile