On Wed, Nov 27, 2019 at 05:31:48PM +0200, Lauri Tirkkonen wrote: > I'll give you some more background that I maybe should have given > earlier already: in my hobby OS Unleashed, we use bmake and earlier did > some (slightly hacky) modifications to subdir.mk to enable paralellizing > jobs in multiple subdirs at the same time. I don't remember the exact > numbers since it's been quite some time, but I was able to cut the base > build time by *a lot* with just that change -- during the build there > were previously a lot of idle CPUs. Those results served as motivation > for me to start looking into doing similar things in OpenBSD, and having > a jobserver is sort of the first step there.
I did experiment with something similar a while back: reorganizing a large part of usr.bin or usr.sbin to just be one single variation of bsd.prog.mk with multiple progs and multiple object files... works just fine for, say 95% of the binaries in those directories (considering there are lots of directories with one single C file or two C files, this sounds like a gain for make -jN, right ?) End result: no measurable gain. That on 4 cpu boxes at the time. There are SMP issues to solve before this actually yields any useful result...