From: Baruch Siach <baruch@tkos.co.il>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCHv2 7/7] automatically set PARALLEL_JOBS when BR2_JLEVEL is 0
Date: Thu, 14 Jun 2012 21:09:18 +0300 [thread overview]
Message-ID: <20120614180918.GA8258@tarshish> (raw)
In-Reply-To: <1339686165-10145-1-git-send-email-ntl@pobox.com>
Hi Nathan,
On Thu, Jun 14, 2012 at 10:02:45AM -0500, Nathan Lynch wrote:
> When BR2_JLEVEL is 0, set PARALLEL_JOBS to double the number of CPUs
> detected. This allows one to more or less fully utilize the host
> system without manually tuning the configuration.
>
> Also make 0 the default value for BR2_JLEVEL.
>
> Signed-off-by: Nathan Lynch <ntl@pobox.com>
> ---
[snip]
> +ifeq ($(BR2_JLEVEL),0)
> +PARALLEL_JOBS:=$(shell echo \
> + $$((2 * `getconf _NPROCESSORS_ONLN 2>/dev/null || echo 1`)))
> +else
> PARALLEL_JOBS:=$(BR2_JLEVEL)
> +endif
IMO, there should be a comment here explaining the magic (2*CPUs) number.
baruch
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
next prev parent reply other threads:[~2012-06-14 18:09 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-12 2:09 [Buildroot] [PATCH 0/7] automatically determine job concurrency Nathan Lynch
2012-06-12 2:09 ` [Buildroot] [PATCH 1/7] introduce PARALLEL_JOBS build system variable Nathan Lynch
2012-06-12 2:09 ` [Buildroot] [PATCH 2/7] boost: change uses of BR2_JLEVEL to PARALLEL_JOBS Nathan Lynch
2012-06-12 2:09 ` [Buildroot] [PATCH 3/7] cmake: change use " Nathan Lynch
2012-06-12 2:09 ` [Buildroot] [PATCH 4/7] midori: " Nathan Lynch
2012-06-12 2:09 ` [Buildroot] [PATCH 5/7] qt: " Nathan Lynch
2012-06-12 2:09 ` [Buildroot] [PATCH 6/7] toolchain/crosstool-ng: " Nathan Lynch
2012-06-12 2:09 ` [Buildroot] [PATCH 7/7] automatically set PARALLEL_JOBS when BR2_JLEVEL is 0 Nathan Lynch
2012-06-13 23:27 ` Arnout Vandecappelle
2012-06-13 23:44 ` Nathan Lynch
2012-06-14 6:07 ` Peter Korsgaard
2012-06-14 6:16 ` Nathan Lynch
2012-06-14 8:56 ` Peter Korsgaard
2012-06-14 8:33 ` Richard Braun
2012-06-14 15:02 ` [Buildroot] [PATCHv2 " Nathan Lynch
2012-06-14 18:09 ` Baruch Siach [this message]
2012-06-16 19:37 ` [Buildroot] [PATCHv3 " Nathan Lynch
2012-06-24 9:13 ` [Buildroot] [PATCH 0/7] automatically determine job concurrency Peter Korsgaard
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=20120614180918.GA8258@tarshish \
--to=baruch@tkos.co.il \
--cc=buildroot@busybox.net \
/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