kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: greg@kroah.com (Greg KH)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Better testing when patching divers/staging/ - howto?
Date: Fri, 5 Sep 2014 13:11:27 -0700	[thread overview]
Message-ID: <20140905201127.GA27210@kroah.com> (raw)
In-Reply-To: <CAC+QLdTDOhoycr37r7mkYx_5yQ-=Bx46gFCr0yN_oVQK-eAeRg@mail.gmail.com>

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

  reply	other threads:[~2014-09-05 20:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-05 16:42 Better testing when patching divers/staging/ - howto? Matthias Beyer
2014-09-05 18:54 ` Greg KH
2014-09-05 19:09   ` Valdis.Kletnieks at vt.edu
2014-09-05 20:02   ` Mandeep Sandhu
2014-09-05 20:11     ` Greg KH [this message]
2014-09-05 20:31       ` Mandeep Sandhu
2014-09-05 20:11   ` Matthias Beyer
2014-09-05 22:17     ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140905201127.GA27210@kroah.com \
    --to=greg@kroah.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).