From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Randy Dunlap <rdunlap@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Norbert Manthey <nmanthey@amazon.de>,
Linus Torvalds <torvalds@linux-foundation.org>,
David Woodhouse <dwmw@amazon.co.uk>,
linux-kernel@vger.kernel.org
Subject: Re: [build-check] scripts: add check_build script
Date: Wed, 4 Jul 2018 10:21:20 +1000 [thread overview]
Message-ID: <20180704102120.591e1074@canb.auug.org.au> (raw)
In-Reply-To: <01151c44-c3f7-c344-8e58-2e6b348960fb@infradead.org>
[-- Attachment #1: Type: text/plain, Size: 1201 bytes --]
Hi all,
On Tue, 3 Jul 2018 16:27:06 -0700 Randy Dunlap <rdunlap@infradead.org> wrote:
>
> On 07/03/2018 03:49 PM, Andrew Morton wrote:
> > On Tue, 3 Jul 2018 15:12:10 +0200 Norbert Manthey <nmanthey@amazon.de> wrote:
> >> +build ()
> >> +{
> >> + local -r LOG_FILE="$1"
> >> + local -i STATUS=0
> >> +
> >> + make clean -j $(nproc) &> /dev/null
> >> + make -j $(nproc) &>> "$LOG_FILE" || STATUS=$?
> >> +
> >> + echo "build status: $STATUS" >> "$LOG_FILE"
> >> + echo "[$SECONDS] build status: $STATUS"
> >> + return "$STATUS"
> >> +}
> >
> > The script never sets nproc. So I guess this is a bare `make -j'.
> > When I type that on my (quite beefy) workstation I get eleventy xillion
> > processes and the machine locks up. Can't even wiggle the mouse.
> > After a 20 minute nap (thanks!) it was still comatose so I hit the big
> > button (who writes this junk??).
> >
> > So you might want to take an educated guess from /proc/cpuinfo here.
>
> or use
> nproc=`getconf _NPROCESSORS_ONLN`
>
> or double it if you want to keep processes ready/waiting.
I have a program called nproc on my system. It is part of coreutils.
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2018-07-04 0:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1530186789-28808-1-git-send-email-nmanthey@amazon.de>
2018-06-28 11:53 ` Norbert Manthey
2018-07-03 13:12 ` Norbert Manthey
2018-07-03 22:49 ` Andrew Morton
2018-07-03 23:27 ` Randy Dunlap
2018-07-04 0:21 ` Stephen Rothwell [this message]
2018-07-04 4:07 ` Andrew Morton
2018-07-04 11:28 ` [build-check v2] " Norbert Manthey
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=20180704102120.591e1074@canb.auug.org.au \
--to=sfr@canb.auug.org.au \
--cc=akpm@linux-foundation.org \
--cc=dwmw@amazon.co.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=nmanthey@amazon.de \
--cc=rdunlap@infradead.org \
--cc=torvalds@linux-foundation.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
all inboxes | Powered by JetHome®