Re: Proposed change to make -j



On Thu, Nov 23, 2006 at 11:20:35PM +0000, John Birrell wrote:
Currently 'make -j' reports an error if the number of jobs
isn't specified.

I'd like to change make(1) to treat -j (without a number) as
meaning "set the number of jobs to the number of processors".

On sun4v, each processor isn't too powerful and system performance
is only decent when you use all the processors - 32 in my case.

I've been working on a parallel 'make release' process which
would benefit from having -j set by default. At the moment I
set MAKEFLAGS=j32 in my environment and this achieves the desired
result, but -j would be more general.

Thoughts?

Besides the portability issues already pointed at, making option's
argument optional itself doesn't fit in the getopt(3) semantics and
is confusing. As a rule, option's argument must be able to begin
with a dash. If this extension to make(1) were good from the
technical POV, I'd suggest "-j -1", "-j max", "-j ncpu", or whatever,
but not a bare "-j". Even if the make(1) code can handle such
optional arguments, other stock tools should not be spoiled by that.
IMHO :-)

--
Yar
_______________________________________________
freebsd-arch@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: Cussing
    ... Of course, I and my colleagues break it all the time, with our mutual consent, but we'd be riskingo ur jobs if we did it in front of another employee who didn't have this sort of 'agreement' with. ... annoying child, exactly equivalent to 'you little nuisance'. ... better not say who called me a 'little sod' when I was a child, ... Although not a curse word or vulgarity, it still has a pretty strong meaning, but recently has been thrown around so much in heated debate that I suspect it's on the verge of losing the literal meaning and becoming merely a word of generalized abuse. ...
    (rec.pets.cats.anecdotes)
  • Re: to unprepare
    ... > The principals are not prepared for their jobs by education colleges. ... > That emergent meaning interferes with the plain intention of the sentence, ...
    (sci.lang)
  • Re: Proposed change to make -j
    ... meaning "set the number of jobs to the number of processors". ... I don't think that it's a good idea to use a flag name that already has a different (and potentially useful) meaning for gmake. ... I have some concern that no matter what number of jobs you decide to run simultaneously when your proposed flag is specified, that choice will not be universally useful, since the best choice of argument to -j depends on what 'make' is building. ...
    (freebsd-arch)
  • Re: Proposed change to make -j
    ... meaning "set the number of jobs to the number of processors". ... a bare -j says to not limit the number of simultaneous jobs. ... make -j `sysctl -n hw.ncpu` ... FreeBSD committer ...
    (freebsd-arch)