Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Aug 2010 10:37:37 +0200
From:      David Naylor <naylor.b.david@gmail.com>
To:        Greg Lewis <glewis@eyesbeyond.com>, freebsd-ports@freebsd.org
Cc:        Anonymous <swell.k@gmail.com>
Subject:   Re: MAKE_JOBS and openjdk6
Message-ID:  <201008291037.40908.naylor.b.david@gmail.com>
In-Reply-To: <20100828213022.GA78573@misty.eyesbeyond.com>
References:  <201006251808.29467.naylor.b.david@gmail.com> <86lj7q31s8.fsf@gmail.com> <20100828213022.GA78573@misty.eyesbeyond.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--nextPart3343707.kzPFGT3LFV
Content-Type: Text/Plain;
  charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

On Saturday 28 August 2010 23:30:22 Greg Lewis wrote:
> On Sun, Aug 29, 2010 at 12:44:39AM +0400, Anonymous wrote:
> > Greg Lewis <glewis@eyesbeyond.com> writes:
> > > I would argue that overriding a private variable is a hack (other por=
ts
> > > doing it doesn't make it not a hack).
> >=20
> > You could've spoke up in ports/148754 about your concern in order for
> > portmgr@ to notice. The PR strived to be less intrusive than divorcing
> > build jobs from make jobs. Besides, I think adding more clutter to
> > Makefiles defeats purpose of having stuff in bsd.port.mk.
>=20
> In that case, whichever way you cut it, we're deliberately trying to
> circumvent what is in bsd.port.mk.

The circumvention is required because bsd.port.mk assumes a certain interfa=
ce=20
that may not be applicable for all ports. =20

> > > Alternative patch attached which seems to achieve the same result from
> > > my perspective without overriding _MAKE_JOBS.
> >=20
> > Hardcoding kern.smp.cpus and ignoring MAKE_JOBS_SAFE/UNSAFE doesn't seem
> > like a less hacky solution. I'd argue that it's more confusing because
> > MAKE_JOBS_UNSAFE is not equal to DISABLE_MAKE_JOBS.
>=20
> The patch I attached (a) does not ignore MAKE_JOBS_{SAFE,UNSAFE} and (b)
> the first patch similarly uses DISABLE_MAKE_JOBS.
>=20
> The first patch does the following:
>=20
> 1. Sets MAKE_JOBS_SAFE _erroneously_ (the port is _not_ MAKE_JOBS_SAFE)
>    purely so it can force the setting of MAKE_JOBS_NUMBER.

Yes and no.  The port is partially MAKE_JOBS_SAFE and is able to build some=
 of=20
the code using make jobs.  This is similar to python26: it is _SAFE but onl=
y a=20
small portion of the build actually uses more than one job which in effect=
=20
makes it the same as _UNSAFE (from a performance perspective). =20

> 2. Overrides passing of -j to the make invocation by fiddling the private
>    variable _MAKE_JOBS, which it has to do because of (1).
>=20
> The one I just provided
>=20
> 1. Leaves the port correctly marked as MAKE_JOBS_UNSAFE and doesn't mess
>    with any private variables.

Your attached patch does not explicitly define either MAKE_JOBS_(UN)SAFE.  =
I=20
would by happy with it being defined as _UNSAFE.  If there are no other=20
problems with your patch (see my comment at the bottom) then I'm happy for=
=20
this patch to be committed. =20

There will still be issues with scripts that try some form of load balancin=
g=20
when building ports but either way it will not be doing what was advertised=
=2E =20
Similar to python. =20

> 2. Respects MAKE_JOB_NUMBER if it is set and otherwise uses the sysctl
>    kern.smp.cpus, the latter being what the port _already_ does.
>=20
> > > Index: Makefile
> > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> > > RCS file: /var/fcvs/ports/java/openjdk6/Makefile,v
> > > retrieving revision 1.28
> > > diff -u -r1.28 Makefile
> > > --- Makefile	15 Aug 2010 05:23:06 -0000	1.28
> > > +++ Makefile	28 Aug 2010 18:27:44 -0000
> > > @@ -147,8 +147,14 @@
> > >=20
> > >  USE_DISPLAY=3D	yes
> > >  .endif
> > >=20
> > > -BUILD_JOBS_NUMBER!=3D	${SYSCTL} -n kern.smp.cpus
> > > +.if !defined(DISABLE_MAKE_JOBS)
> > > +.if defined(MAKE_JOBS_NUMBER)
> > > +BUILD_JOBS_NUMBER=3D	${MAKE_JOBS_NUMBER}
> > > +.else
> > > +BUILD_JOBS_NUMBER=3D	`${SYSCTL} -n kern.smp.cpus`
> > > +.endif
> > >=20
> > >  MAKE_ENV+=3D	HOTSPOT_BUILD_JOBS=3D${BUILD_JOBS_NUMBER}

Is it safe to pass an empty HOTSPOT_BUILD_JOBS to MAKE_ENV? (i.e. when=20
DISABLE_MAKE_JOBS is defined.) =20

> > > +.endif
> > >=20
> > >  COPYDIRS=3D	\
> > > =20
> > >  	hotspot/src/os/linux/launcher \

--nextPart3343707.kzPFGT3LFV
Content-Type: application/pgp-signature; name=signature.asc 
Content-Description: This is a digitally signed message part.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (FreeBSD)

iEYEABECAAYFAkx6HFQACgkQUaaFgP9pFrLR3QCePKUmMqX/Z3LYdk1ztJeG6m0F
1hwAnRdKJKoVR61uoByfiIKdVIOLe4hm
=FYvI
-----END PGP SIGNATURE-----

--nextPart3343707.kzPFGT3LFV--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201008291037.40908.naylor.b.david>