[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9A8BFC66-8723-4E33-B82F-BDF0DBE8133C@linux-foundation.org>
Date: Tue, 03 Jul 2018 21:07:32 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Stephen Rothwell <sfr@...b.auug.org.au>,
Randy Dunlap <rdunlap@...radead.org>
CC: Norbert Manthey <nmanthey@...zon.de>,
Linus Torvalds <torvalds@...ux-foundation.org>,
David Woodhouse <dwmw@...zon.co.uk>,
linux-kernel@...r.kernel.org
Subject: Re: [build-check] scripts: add check_build script
On July 3, 2018 5:21:20 PM PDT, Stephen Rothwell <sfr@...b.auug.org.au> wrote:
>Hi all,
>
>On Tue, 3 Jul 2018 16:27:06 -0700 Randy Dunlap <rdunlap@...radead.org>
>wrote:
>>
>> On 07/03/2018 03:49 PM, Andrew Morton wrote:
>> > On Tue, 3 Jul 2018 15:12:10 +0200 Norbert Manthey
><nmanthey@...zon.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.
Ohdoh, I misread, sorry.
Powered by blists - more mailing lists