Date: Sat, 21 Jan 2006 07:52:20 +1100 From: Peter Jeremy <PeterJeremy@optushome.com.au> To: Kris Kennaway <kris@obsecurity.org> Cc: freebsd-hackers@freebsd.org Subject: Re: speed up port compiling using RAM (tmpfs) ??? Message-ID: <20060120205219.GK25397@cirb503493.alcatel.com.au> In-Reply-To: <20060120194700.GB41039@xor.obsecurity.org> References: <79e2026f0601142345x1a9269bdl3153d1bb110be08d@mail.gmail.com> <86ek34d35f.fsf@xps.des.no> <17359.49899.183831.844670@bhuda.mired.org> <86k6cww445.fsf@xps.des.no> <20060119175224.GA71633@csh.rit.edu> <79e2026f0601191215p117d78ebjbee2c4b710075154@mail.gmail.com> <43D0139A.1040601@myrealbox.com> <20060119230604.GA98670@xor.obsecurity.org> <43D11499.8040808@myrealbox.com> <20060120194700.GB41039@xor.obsecurity.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 2006-Jan-20 14:47:00 -0500, Kris Kennaway wrote: >On Fri, Jan 20, 2006 at 11:49:29AM -0500, Gary Thorpe wrote: > >> >-j is not safe to use with port builds since many ported software >> >contain race conditions in the build. >> > >> >Kris >> >> This effectively means that you cannot take advantage of SMP to compile >> FreeBSD's ports collection. That sounds like a big >> limitation...especially for people trying to speed up bulk builds. > >Yeah, but what do you propose to do about it? We have 14000 ports >that need to be inspected for build race conditions and fixed before >you can turn on -j by default. There are some areas of the FreeBSD port building infrastructure that could be enhanced to make it possible to run multiple top-level makes in parallel, even if individual ports can't be build with '-j'. IMHO, the biggest problem (as des pointed out) is that there's nothing to prevent two makes attempting to build the same port (this can easily happen when both ports A and B depend on port C). One possible solution would be to create another status file in the work directory and hold a file lock (flock/lockf) on it whilst a make is in progress. Any parallel attempt to make that port would block. If the above was implemented, an enhancement would then be to process the port's dependency list in parallel, rather than serially. This would allow a make that was blocked on one dependency to continue with a different dependency. -- Peter Jeremy
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060120205219.GK25397>