All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: Alessio Igor Bogani <abogani@texware.it>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: Suggestions request for speed-up kernel compilation
Date: Sat, 25 Apr 2009 09:54:40 +0200	[thread overview]
Message-ID: <878wlpkw1r.fsf@basil.nowhere.org> (raw)
In-Reply-To: <63a49ef40904240257w45cc9c03n6e71ff4e4f69209b@mail.gmail.com> (Alessio Igor Bogani's message of "Fri, 24 Apr 2009 11:57:35 +0200")

Alessio Igor Bogani <abogani@texware.it> writes:

> I'm a kernel newbie and I would be very happy to receive some tips
> about kernel compilation from experienced developers.
>

Some tricks:

If you just want to test that the file you've been hacking
on compiles you can use make dir/path/file.o

Use the minimum config file for your machines, 
except for occasional fuller verification builds

Set the right -j make level. You have to experiment 
what is best.

Not enabling CONFIG_DEBUGINFO speeds up compilation significantly

When you use ccache make sure you have the cache directory on
the same partition and enable CCACHE_HARDLINK=1. Alternatively
what also works (but is a bit more expensive) is to put
the ccache cache on a SSD.

What works very well is to throw some money at it -- compilation
scales very well in a cluster. Get the cheapest quad core you can get
as an additional machine and use a tool like icecream
(http://en.opensuse.org/Icecream) to distribute the compilation.

You need special wrappers like 
ftp://firstfloor.org/pub/ak/smallsrc/icecache.c to combine
icecream with ccache

I also found using the "gold" linker in latest binutils
speeds up builds because especially when you already
have parallel compilations the linker is often a bottleneck.

-Andi

-- 
ak@linux.intel.com -- Speaking for myself only.

      parent reply	other threads:[~2009-04-25  7:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-24  9:57 Suggestions request for speed-up kernel compilation Alessio Igor Bogani
2009-04-24 10:37 ` Sven-Haegar Koch
2009-04-24 10:38 ` Sam Ravnborg
2009-04-24 11:59 ` Richard Kennedy
2009-04-24 14:02 ` Al Viro
2009-04-25  7:54 ` Andi Kleen [this message]

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=878wlpkw1r.fsf@basil.nowhere.org \
    --to=andi@firstfloor.org \
    --cc=abogani@texware.it \
    --cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.