Re: [Lse-tech] 7.52 second kernel compile

Bill Davidsen
2002-03-19T16:55:07Z

On Sat, 16 Mar 2002, Martin J. Bligh wrote:

> > I think Im addicted. I need help!
>
> Well, you're not going to get much competition, so maybe help
> would be more in order ;-) ;-)
>
> Are you still doing something like this?
> # MAKE="make -j14" /usr/bin/time make -j14 bzImage
>
> I tried setting the MAKE variable as well as doing the -j,
> but it actually made kernel compile time slower - what difference
> does it make on your machine? Can somebody clarify what this
> actually does, as opposed to the -j on the command line?

Passing the -j option to make either (a) starts N processes at the
initial level and implies -j1 for submakes, (b) starts N processes at base
level each of which get the -jN and use it, or (c) -jN means run a total
of N processes shared between everything running. The [abc] depends on the
make you run, BSD, xmake, old GNU, new GNU, etc.

No that doesn't clarify things, the correct answer is "it depends." I
have always used the environment variable with older GNU make, havent
rethought it on very recent systems. I suggest that N be Nproc+1 for best
results, but I've never had more than four CPUs with a build large enough
to measure.

> BTW - the other tip that was in the big book of whizzy kernel
> compiles was to set gcc to use -pipe ... you might want to try
> that.

I general -pipe is a bad thing for uni, non-win for SMP (for any -j)
although I have often thought that making the pipe buffer larger might
change that.

--
bill davidsen <davidsen@tmr.com>
CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.