Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Dec 2012 11:19:30 -0500
From:      John Baldwin <jhb@freebsd.org>
To:        Damien Fleuriot <ml@my.gd>
Cc:        "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>, Ryan Stone <rysto32@gmail.com>, FreeBSD Current <freebsd-current@freebsd.org>, AndreOppermann <andre@freebsd.org>, Warner Losh <imp@bsdimp.com>
Subject:   Re: kernel module parallel build?
Message-ID:  <201212061119.30524.jhb@freebsd.org>
In-Reply-To: <20E25F79-2C53-45FD-BB7F-060AC9B26245@my.gd>
References:  <5083D84E.50903@freebsd.org> <0EC857C9-4C1B-467D-8499-B493401B64BC@bsdimp.com> <20E25F79-2C53-45FD-BB7F-060AC9B26245@my.gd>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday, December 05, 2012 6:51:17 pm Damien Fleuriot wrote:
> 
> On 5 Dec 2012, at 18:39, Warner Losh <imp@bsdimp.com> wrote:
> 
> > 
> > On Dec 5, 2012, at 9:42 AM, John Baldwin wrote:
> > 
> >> On Tuesday, December 04, 2012 2:41:32 pm Ryan Stone wrote:
> >>> On Tue, Dec 4, 2012 at 10:52 AM, John Baldwin <jhb@freebsd.org> wrote:
> >>> 
> >>>> Hmm, I certainly see the module directories being built in parallel.  Some
> >>>> of
> >>>> the make jobs may not be as obvious since links are silent (no output
> >>>> unless
> >>>> there is an error).
> >>>> 
> >>>> 
> >>> This is definitely not the behaviour that I see trying to build any version
> >>> of FreeBSD.  I see the same behaviour as Andre: the depend and all targets
> >>> both iterate through the module directories sequentially.  It never builds
> >>> two module subdirectories concurrently.
> >> 
> >> Hmm, I think I was confused by seeing kernel builds intermingle with the 
> >> associated modules.  sys/modules/Makefile uses bsd.subdir.mk.  I think I see 
> >> similar things in world builds where I will see parallel builds of bin vs sbin 
> >> vs usr.bin vs usr.sbin, but within each of those directories the builds go 
> >> sequentially.  I think you would need to change bsd.subdir.mk if you want to 
> >> fix this.
> > 
> > The builds are in parallel, just that the parallelism is low because it is only parallel within the module being built. Would love to see a fix.
> > 
> > Warner
> > 
> 
> All trolling aside, I believe an awesome fix to be setting module override in /etc/make.conf to only build the 4-5 specific modules one needs.
> 
> To be honest I think this configuration tweak should be advertised a bit more as it definitely speeds up kernel builds.
> 
> I would be happy to check if this is advertised in the handbook in the "rebuilding kernel" section and enhance its visibility if required.
> 
> I can provide en_US and fr_FR.

Better than doing it in /etc/make.conf (or /etc/src.conf) is doing it direclty
in the kernel config file itself via

makeoptions MODULES_OVERRIDE="foo"

You can use multiple of these (with +=) in a config file as well.

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201212061119.30524.jhb>