FreeBSD src
Go to file
Dimitry Andric 54ff5d7323 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 after:	2 weeks
2014-03-26 22:30:38 +00:00
bin Add a SUBDIR_PARALLEL option to bsd.subdir.mk, to allow make to process 2014-03-26 22:30:38 +00:00
cddl MFV 263436-263438: 2014-03-21 01:32:25 +00:00
contrib Avoid "cc1: warning: is shorter than expected" when using GNU cpp in 2014-03-26 19:57:50 +00:00
crypto Upgrade to OpenSSH 6.6p1. 2014-03-25 11:05:34 +00:00
etc Update userspace users of hw.bus.devctl_disable. 2014-03-26 02:25:40 +00:00
games Correct a typo in Malcolm MacDougall's name. 2014-02-15 22:15:24 +00:00
gnu Add a new ARM TARGET_ARCH, armv6hf. This is considered experimental. 2014-03-23 12:49:25 +00:00
include Remove AppleTalk support. 2014-03-14 06:29:43 +00:00
kerberos5 Revert my commit in r261253; the real problem was tackled in r262209. 2014-02-20 20:53:29 +00:00
lib Add a SUBDIR_PARALLEL option to bsd.subdir.mk, to allow make to process 2014-03-26 22:30:38 +00:00
libexec Make bsd.test.mk the only public mk fragment for the building of tests. 2014-03-14 08:56:19 +00:00
release Document r263754 2014-03-26 01:36:00 +00:00
rescue Remove IPX support. 2014-03-14 02:58:48 +00:00
sbin Add a SUBDIR_PARALLEL option to bsd.subdir.mk, to allow make to process 2014-03-26 22:30:38 +00:00
secure Upgrade to OpenSSH 6.6p1. 2014-03-25 11:05:34 +00:00
share Add a SUBDIR_PARALLEL option to bsd.subdir.mk, to allow make to process 2014-03-26 22:30:38 +00:00
sys Fix build without SMP. 2014-03-26 17:40:13 +00:00
tests tests/sys/netinet/Makefile 2014-03-25 15:03:08 +00:00
tools Update userspace users of hw.bus.devctl_disable. 2014-03-26 02:25:40 +00:00
usr.bin Add a SUBDIR_PARALLEL option to bsd.subdir.mk, to allow make to process 2014-03-26 22:30:38 +00:00
usr.sbin Add a SUBDIR_PARALLEL option to bsd.subdir.mk, to allow make to process 2014-03-26 22:30:38 +00:00
COPYRIGHT Bump copyright year. 2013-12-31 12:18:10 +00:00
LOCKS
MAINTAINERS Since mlaier has been inactive for a long time, grab maintainership on pf. 2014-03-20 06:22:39 +00:00
Makefile Add a new ARM TARGET_ARCH, armv6hf. This is considered experimental. 2014-03-23 12:49:25 +00:00
Makefile.inc1 Add a new ARM TARGET_ARCH, armv6hf. This is considered experimental. 2014-03-23 12:49:25 +00:00
ObsoleteFiles.inc Add more obsolete files 2014-03-16 20:31:05 +00:00
README
UPDATING Rather than require a makeoptions DEBUG to get debug correct, 2014-03-25 22:08:31 +00:00

This is the top level of the FreeBSD source directory.  This file
was last revised on:
$FreeBSD$

For copyright information, please see the file COPYRIGHT in this
directory (additional copyright information also exists for some
sources in this tree - please see the specific source directories for
more information).

The Makefile in this directory supports a number of targets for
building components (or all) of the FreeBSD source tree, the most
commonly used one being ``world'', which rebuilds and installs
everything in the FreeBSD system from the source tree except the
kernel, the kernel-modules and the contents of /etc.  The ``world''
target should only be used in cases where the source tree has not
changed from the currently running version.  See:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html
for more information, including setting make(1) variables.

The ``buildkernel'' and ``installkernel'' targets build and install
the kernel and the modules (see below).  Please see the top of
the Makefile in this directory for more information on the
standard build targets and compile-time flags.

Building a kernel is a somewhat more involved process, documentation
for which can be found at:
   http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html
And in the config(8) man page.
Note: If you want to build and install the kernel with the
``buildkernel'' and ``installkernel'' targets, you might need to build
world before.  More information is available in the handbook.

The sample kernel configuration files reside in the sys/<arch>/conf
sub-directory (assuming that you've installed the kernel sources), the
file named GENERIC being the one used to build your initial installation
kernel.  The file NOTES contains entries and documentation for all possible
devices, not just those commonly used.  It is the successor of the ancient
LINT file, but in contrast to LINT, it is not buildable as a kernel but a
pure reference and documentation file.


Source Roadmap:
---------------
bin		System/user commands.

cddl		Various commands and libraries under the Common Development
		and Distribution License.

contrib		Packages contributed by 3rd parties.

crypto		Cryptography stuff (see crypto/README).

etc		Template files for /etc.

games		Amusements.

gnu		Various commands and libraries under the GNU Public License.
		Please see gnu/COPYING* for more information.

include		System include files.

kerberos5	Kerberos5 (Heimdal) package.

lib		System libraries.

libexec		System daemons.

release		Release building Makefile & associated tools.

rescue		Build system for statically linked /rescue utilities.

sbin		System commands.

secure		Cryptographic libraries and commands.

share		Shared resources.

sys		Kernel sources.

tools		Utilities for regression testing and miscellaneous tasks.

usr.bin		User commands.

usr.sbin	System administration commands.


For information on synchronizing your source tree with one or more of
the FreeBSD Project's development branches, please see:

  http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/synching.html