Better testing when patching divers/staging/ - howto?

Greg KH greg at kroah.com
Fri Sep 5 16:11:27 EDT 2014


On Fri, Sep 05, 2014 at 01:02:17PM -0700, Mandeep Sandhu wrote:
> >
> > Also do a faster make, with the -j option.  Pass in 2x the number of CPU
> > cores you have, so if you have 2 cores do:
> >         make -j4
> >
> > to get a _much_ faster build.
> >
> 
> Isn't the usual "wisdom" to run as many jobs as the number of CPUs
> (like so grep processor /proc/cpuinfo | wc -l)?

I've always found 2x is "best".  And I've been doing this for a while :)

> Wouldn't more of jobs simply contend for CPU time as there are more
> processes than processors?

I/O is usually your limiting factor on kernel builds, not CPU time.  You
want to keep those CPUs "full" of stuff to do, so give them things to
process while the i/o is completing from other tasks.

But as always, try it out on your system to see what works best for you,
maybe your system is CPU bound on kernel builds as you are running out
of a tmpfs (hint, even then I've found that you want to have more jobs
than the number of processors...)

thanks,

greg k-h



More information about the Kernelnewbies mailing list