CFR, CFT: Fine-grained SUBDIR dependencies for parallel builds

Ian Lepore ian at FreeBSD.org
Sat May 31 14:04:27 UTC 2014


On Fri, 2014-05-30 at 13:54 +0800, Jia-Shiun Li wrote:
> Updated patch works fine for me surviving -j64 buildworld on
> quad-core. Compile time did not differ much, ~35 mins. I 'd guess
> that's because build has already been well paralleled inside each
> subdirs for ~4 jobs.
> 
> It would be even better if someone can stress it on multicore system,
> say 12+ cores, to explore higher hw concurrency to see the difference.
> 
> Looks other targets using .for loops can be translated to this finer
> dependency rules as well? e.g. _bootstrap-tools, probably already on
> your todo list?
> 
> 
> -Jia-Shiun.

Yes, I wouldn't expect much build time difference because this doesn't
really increase the parallelism other than for a couple of the
early-build libraries.  It does add new dependencies that weren't
expressed before and were apparently just accidentally not causing
problems for anyone.

The parallelism in the bootstrap stuff in Makefile.inc1 is done with a
different-but-similar mechanism, and it would be nice to fix that to
just use bsd.subdir.mk instead of almost-duplicating it inline.  That's
on a longer-term to-do list for me.

-- Ian




More information about the freebsd-arch mailing list