Lucid build performance improvements pull request

Herton Ronaldo Krzesinski herton.krzesinski at canonical.com
Thu Aug 25 20:36:31 UTC 2011


On Tue, Aug 23, 2011 at 03:08:44PM -0600, Tim Gardner wrote:
> These patches in Oneiric seem to be working pretty well. With these
> changes and sufficient server capability I've seen build times cut
> in half. Now you'll be able to control concurrency from the command
> line, e.g.,
> 
> dpkg-buildpackage -j`getconf _NPROCESSORS_ONLN` -B
> 
> http://bugs.launchpad.net/bugs/832352
> 
> The following changes since commit 2f28aed962765c698f9ed3bc2385dbe79ada2514:
>   Seth Forshee (1):
>         drm/i915: Remove BUG_ON from i915_gem_evict_something
> 
> are available in the git repository at:
> 
>   git://kernel.ubuntu.com/rtg/ubuntu-lucid.git makefile-improvenets
> 
> Tim Gardner (11):
>       UBUNTU: [Config] Simplify binary-udebs dependencies
>       UBUNTU: [Config] kernel preparation cannot be parallelized
>       UBUNTU: [Config] Linearize module/abi checks
>       UBUNTU: [Config] Linearize and simplify tree preparation rules
>       UBUNTU: [Config] Build kernel image in parallel with modules
>       UBUNTU: [Config] Set concurrency for kmake invocations
>       UBUNTU: [Config] Improve install-arch-headers speed
>       UBUNTU: [Config] Fix binary-perarch dependencies
>       UBUNTU: [Config] Removed stamp-flavours target
>       UBUNTU: [Config] Serialize binary indep targets
>       UBUNTU: [Config] Use build stamp directly

I'm no make expert, but I noted some things.

In changes

UBUNTU: [Config] kernel preparation cannot be parallelized
UBUNTU: [Config] Set concurrency for kmake invocations

you force -j1. Indeed scripts target depend on oldconfig/prepare first:

$(build_cd) $(kmake) $(build_O) -j1 silentoldconfig prepare scripts

but each target could benefit from parallelism (which I expect to be the
case of scripts target), so a better invocation would be:

$(build_cd) $(kmake) $(build_O) silentoldconfig
$(build_cd) $(kmake) $(build_O) prepare
$(build_cd) $(kmake) $(build_O) scripts

Also, prepare alread implies/runs silentoldconfig, so we could simplify
even more I think:

$(build_cd) $(kmake) $(build_O) prepare
$(build_cd) $(kmake) $(build_O) scripts

I don't expect significant improvement, but would be better.

In change

UBUNTU: [Config] Linearize module/abi checks

you could remove the install -d below "+$(abidir)/%.modules: abi-check-%"
since through abi-check-% -> $(abidir)/% we already get the directory 
created.

Also, on a quick look, seems this change is unecessary:
abi-check script doesn't seem change/care about the modules list
module-check script also only cares about modules list
Unless I'm missing something else.


In change

UBUNTU: [Config] Serialize binary indep targets

I'm in doubt, why serialize it?


The rest looks ok to me, it's great having a better build time.

> 
>  debian/rules.d/2-binary-arch.mk  |   35
> ++++++++++++++---------------------
>  debian/rules.d/3-binary-indep.mk |   29 ++++++++++++-----------------
>  debian/rules.d/4-checks.mk       |   10 ++--------
>  debian/rules.d/5-udebs.mk        |    4 ++--
>  4 files changed, 30 insertions(+), 48 deletions(-)
> -- 
> Tim Gardner tim.gardner at canonical.com
> 
> -- 
> kernel-team mailing list
> kernel-team at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
> 

-- 
[]'s
Herton




More information about the kernel-team mailing list