Subject: Re: pkgsrc on SMP machines
To: Geert Hendrickx <ghen@NetBSD.org>
From: None <segv@netctl.net>
List: tech-pkg
Date: 12/15/2005 22:55:20
On Thu, 15 Dec 2005 23:43:15 +0100
Geert Hendrickx <ghen@NetBSD.org> wrote:
> On Thu, Dec 15, 2005 at 11:30:21PM +0100, Geert Hendrickx wrote:
> > On Thu, Dec 15, 2005 at 10:55:24PM +0100, Geert Hendrickx wrote:
> > > On Thu, Dec 15, 2005 at 10:46:58PM +0100, Hubert Feyrer wrote:
> > > > My guess (hope) is that things work mostly well with automake, actually.
> > > > After all, I doubt pkgsrc is the only place where this is an issue.
> > >
> > > IIRC Gentoo Linux supports (and promotes) the use of -j via their
> > > "portage" system, we could look into their framework to see how they did
> > > it.
> >
> > I looked it up: the user can set something like MAKEOPTS="-j4" in his
> > /etc/make.conf to enable parallel builds, which is then used by default
> > for all packages. Only some some individual packages ("ebuilds"), like
> > mozilla, disable this (when they are known to break otherwise).
> \-> by explicitly invoking "make -j1"
>
> I asked #gentoo about it. They told me most packages are thread-safe.
>
> We could mark tested packages with THREAD_SAFE=(yes|no), and have those
> built with -j${THREADS}, where THREADS is user-settable. THREAD_SAFE would
> default to "no" (for unverified packages), at least in the beginning. When
> it turns out that this works fine, we could change this default to yes (but
> THREADS would anyway default to 1).
>
> Just brain-storming here.
>
> Geert
I feel that having a variable called THREAD_SAFE is a bit confusing, coz it has
nothing to do with threads. Make forks subshells when you specify multiple jobs
with -j