Re: Safety of -j N when building kernels?

Keith Owens
2002-05-22T23:32:52Z

On Wed, 22 May 2002 10:53:20 -0600,
Eric Weigle <ehw@lanl.gov> wrote:
>So are the kernel's current Makefiles really SMP safe -- can one really
>run multiple jobs when building Linux kernels? Any horror stories, or am
>I just paranoid?

make dep is not parallel safe. On some architectures make -jN dep will
generate corrupt data, especially with module symbol versions. You
might get away with it.

It is not safe on any architecture to make -jN *config dep bzImage
modules in one command, you need three separate commands for make -jN
*config, make -jN dep and make -jN bzImage modules. The install step
must also be a separate command.

Building bzImage and modules should be parallel safe, as long as your
machine can take the cpu load and has enough file descriptors.
Sometimes people do not understand makefiles so the odd driver may not
build correctly. aic7xxx around 2.4.19-pre5 was not parallel safe.

Of course, in kbuild 2.5, all of this is parallel safe. make -j
*config install works fine.