From b0d289c2d9b4bed0d1735c57ae6d64f18bd0ed17 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Mon, 8 Jun 2015 17:19:18 -0700 Subject: [PATCH] build - Parallelize kernel module build * Parallelize the module build portion of a full buildkernel. * Decreases full kernel build times significantly. The build is up to 3 times faster now. * On monster full kernel build time goes from 10:48 to 3:04. --- sys/bus/Makefile | 4 ++++ sys/bus/u4b/Makefile | 4 ++++ sys/dev/Makefile | 3 +++ sys/dev/acpica/Makefile | 4 ++++ sys/dev/crypto/Makefile | 4 ++++ sys/dev/disk/Makefile | 4 ++++ sys/dev/drm/Makefile | 4 ++++ sys/dev/drm/radeonfw/Makefile | 4 ++++ sys/dev/misc/Makefile | 4 ++++ sys/dev/netif/Makefile | 4 ++++ sys/dev/pccard/Makefile | 4 ++++ sys/dev/powermng/Makefile | 4 ++++ sys/dev/raid/Makefile | 4 ++++ sys/dev/sound/Makefile | 7 ++++++- sys/net/Makefile | 4 ++++ sys/netgraph/Makefile | 4 ++++ sys/vfs/Makefile | 4 ++++ 17 files changed, 69 insertions(+), 1 deletion(-) diff --git a/sys/bus/Makefile b/sys/bus/Makefile index 3b44fc4319..eb0c698071 100644 --- a/sys/bus/Makefile +++ b/sys/bus/Makefile @@ -1,3 +1,7 @@ SUBDIR= cam firewire iicbus mmc pccard ppbus smbus u4b +# empty to allow concurrent building +# +SUBDIR_ORDERED= + .include diff --git a/sys/bus/u4b/Makefile b/sys/bus/u4b/Makefile index 0629967b62..7245e79441 100644 --- a/sys/bus/u4b/Makefile +++ b/sys/bus/u4b/Makefile @@ -1,3 +1,7 @@ SUBDIR= usb audio controller input misc net quirk serial storage template wlan +# empty to allow concurrent building +# +SUBDIR_ORDERED= + .include diff --git a/sys/dev/Makefile b/sys/dev/Makefile index aacba424cb..33ca7b9e6f 100644 --- a/sys/dev/Makefile +++ b/sys/dev/Makefile @@ -17,6 +17,9 @@ SUBDIR= \ video \ virtual +# empty to allow concurrent building +SUBDIR_ORDERED= + .for dir in ${SUBDIR} .if empty(DEV_SUPPORT:M${dir}) && empty(DEV_SUPPORT:M${dir}/*) SUBDIR:= ${SUBDIR:N${dir}} diff --git a/sys/dev/acpica/Makefile b/sys/dev/acpica/Makefile index 2e9eddd227..233ce99747 100644 --- a/sys/dev/acpica/Makefile +++ b/sys/dev/acpica/Makefile @@ -119,4 +119,8 @@ acpi_wakecode.h: acpi_wakecode.S SUBDIR= acpi_asus acpi_dock acpi_fujitsu acpi_hp acpi_panasonic acpi_sony SUBDIR+=acpi_thinkpad acpi_toshiba acpi_video acpi_wmi aibs +# Empty for concurrent build +# +SUBDIR_ORDERED= + .include diff --git a/sys/dev/crypto/Makefile b/sys/dev/crypto/Makefile index 428eede49b..1b4ae43aa8 100644 --- a/sys/dev/crypto/Makefile +++ b/sys/dev/crypto/Makefile @@ -4,4 +4,8 @@ SUBDIR= aesni cryptodev hifn padlock rdrand rndtest safe tpm ubsec SUBDIR+=glxsb .endif +# Empty for concurrent build +# +SUBDIR_ORDERED= + .include diff --git a/sys/dev/disk/Makefile b/sys/dev/disk/Makefile index b9c2346b80..3ec33c7fae 100644 --- a/sys/dev/disk/Makefile +++ b/sys/dev/disk/Makefile @@ -10,4 +10,8 @@ SUBDIR:= ${SUBDIR:N${dir}} .endif .endfor +# Empty for concurrent build +# +SUBDIR_ORDERED= + .include diff --git a/sys/dev/drm/Makefile b/sys/dev/drm/Makefile index 64b2350113..03069e45f3 100644 --- a/sys/dev/drm/Makefile +++ b/sys/dev/drm/Makefile @@ -4,4 +4,8 @@ SUBDIR = drm radeon radeonfw SUBDIR+= i915 .endif +# empty to allow concurrent building +# +SUBDIR_ORDERED= + .include diff --git a/sys/dev/drm/radeonfw/Makefile b/sys/dev/drm/radeonfw/Makefile index bef22a47a9..d3f0496a6e 100644 --- a/sys/dev/drm/radeonfw/Makefile +++ b/sys/dev/drm/radeonfw/Makefile @@ -222,4 +222,8 @@ SUBDIR= \ verde_rlc \ verde_smc +# empty to allow concurrent building +# +SUBDIR_ORDERED= + .include diff --git a/sys/dev/misc/Makefile b/sys/dev/misc/Makefile index c75dcf1aa1..fe7509c160 100644 --- a/sys/dev/misc/Makefile +++ b/sys/dev/misc/Makefile @@ -1,4 +1,8 @@ SUBDIR= amdsbwd cmx cpuctl dcons ecc ichwd ipmi joy kbdmux lpbb \ nmdm pcfclock putter snp syscons tbridge coremctl dimm +# Empty for concurrent build +# +SUBDIR_ORDERED= + .include diff --git a/sys/dev/netif/Makefile b/sys/dev/netif/Makefile index 7b94033ed2..9458e89291 100644 --- a/sys/dev/netif/Makefile +++ b/sys/dev/netif/Makefile @@ -9,4 +9,8 @@ SUBDIR= an age alc ale ath bce bfe bge bwn \ SUBDIR+=ar ed sbni sr .endif +# Empty for concurrent build +# +SUBDIR_ORDERED= + .include diff --git a/sys/dev/pccard/Makefile b/sys/dev/pccard/Makefile index 6944cbf290..50b6b2821a 100644 --- a/sys/dev/pccard/Makefile +++ b/sys/dev/pccard/Makefile @@ -3,4 +3,8 @@ SUBDIR=cardbus exca pccbb +# Empty for concurrent build +# +SUBDIR_ORDERED= + .include diff --git a/sys/dev/powermng/Makefile b/sys/dev/powermng/Makefile index 6a6b6db15d..fd39fc14cc 100644 --- a/sys/dev/powermng/Makefile +++ b/sys/dev/powermng/Makefile @@ -3,4 +3,8 @@ SUBDIR+=intpm kate km lm powernow uguru SUBDIR+=viapm wbsio perfbias clockmod SUBDIR+=memtemp +# Empty for concurrent build +# +SUBDIR_ORDERED= + .include diff --git a/sys/dev/raid/Makefile b/sys/dev/raid/Makefile index 2a5f89ac1b..91a3ee068f 100644 --- a/sys/dev/raid/Makefile +++ b/sys/dev/raid/Makefile @@ -5,4 +5,8 @@ SUBDIR= aac amr arcmsr asr ciss hpt27xx hptiop hptmv hptrr \ SUBDIR+=pst .endif +# Empty for concurrent build +# +SUBDIR_ORDERED= + .include diff --git a/sys/dev/sound/Makefile b/sys/dev/sound/Makefile index ae96fd426b..76069c434d 100644 --- a/sys/dev/sound/Makefile +++ b/sys/dev/sound/Makefile @@ -1,7 +1,12 @@ -# $FreeBSD: head/sys/modules/sound/Makefile 132236 2004-07-16 04:00:08Z tanimura $ +# Makefile +# SUBDIR = SUBDIR += sound SUBDIR += driver +# empty to allow concurrent building +# +SUBDIR_ORDERED= + .include diff --git a/sys/net/Makefile b/sys/net/Makefile index dee8162f62..caec824eef 100644 --- a/sys/net/Makefile +++ b/sys/net/Makefile @@ -3,4 +3,8 @@ SUBDIR=accf_data accf_http disc faith gif gre sl stf tap tun \ dummynet3 ipfw3 ipfw3_basic ipfw3_nat ipfw3_layer2 ipfw3_layer4 \ ip6fw ip_mroute sppp ppp_layer pf +# empty to allow concurrent building +# +SUBDIR_ORDERED= + .include diff --git a/sys/netgraph/Makefile b/sys/netgraph/Makefile index b9170fdb34..a4242f7d91 100644 --- a/sys/netgraph/Makefile +++ b/sys/netgraph/Makefile @@ -36,4 +36,8 @@ SUBDIR+= mppc SUBDIR+= sync_ar sync_sr .endif +# empty to allow concurrent building +# +SUBDIR_ORDERED= + .include diff --git a/sys/vfs/Makefile b/sys/vfs/Makefile index 06dce5182e..6f340e7236 100644 --- a/sys/vfs/Makefile +++ b/sys/vfs/Makefile @@ -5,4 +5,8 @@ SUBDIR=fifofs msdosfs portal nfs procfs puffs \ hpfs ntfs smbfs isofs mfs udf \ nullfs hammer tmpfs +# empty to allow concurrent building +# +SUBDIR_ORDERED= + .include -- 2.11.4.GIT