Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp355716imm; Tue, 3 Jul 2018 21:08:32 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfx2k5AfkyZKrE9iqh5dA8spb+2vf8Uyh6MgyaHxBB7x7+6VE44+iYE10YDxwukAm+/d5Bu X-Received: by 2002:a65:560a:: with SMTP id l10-v6mr428565pgs.130.1530677312486; Tue, 03 Jul 2018 21:08:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530677312; cv=none; d=google.com; s=arc-20160816; b=HQqBSsAuupf1kF4MhLURnUn42KUzluLobKdS3YJJKD26eTahcltcGjQSNLRys3FNl1 A05K5dUfpE8jy/BEiaUsAsYi13SEiMPhigUCBfIjg1PQexJ8cfGzNP8TwQvK/EjAVYaw qzJsdWTNXwWPP+Lsvp50pzmqyHPRfglrQvne2J3A3blQkdpCwH8Gm3PbIO5p4FsejxGg o3Jj7aVbtyMT2dcFfoXM9j/ChUiMmAAUrx61M69Hg0MyQ13f+4WKgKjq3l6lxruJhOoC n/sCl4qn/FKOCq2BPGSDUo81atg6yt6URDmIk7o/pI9ZVjT697y5k7hI4oh8Yzi1ONkp ce5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:from:cc:to:subject :content-transfer-encoding:mime-version:references:in-reply-to :user-agent:date:arc-authentication-results; bh=1gWXA/Vw5l6LSA2FRfCcHMsdv/1P0vojECaAmjclESk=; b=L2XlL73HSWQoaMtolEmnk2JDt714sYEv23drfOEVRtqJjO0USKfpH0qR3khw81oOUG L2L1DC4iXnzRHGO30QWh42fSobpPqEf+Kq6M69Jkfe6SSM8BxFFLJSTamIaMaKFPpadX E2K51pu5SwvQ4dLiylLdIQXewStmIqgn0OmD194Zw6JHplWHWik9prCdo6m38HK6wvKM 54PdGFb1G61X7Ad1Sl9CCLkRo0kTx+sZFrXZbMhWvn1efO73v+7MadZq25xG8ptr6fFd Tb4Cqwz0g//Y41I3mW9TFouCPo7EzULcMQXu42Yvz22WR9Dj9UwjtX5Vflwnyc0407yN WncA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b4-v6si2403221pgw.50.2018.07.03.21.08.18; Tue, 03 Jul 2018 21:08:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753533AbeGDEHh convert rfc822-to-8bit (ORCPT + 99 others); Wed, 4 Jul 2018 00:07:37 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:47470 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751407AbeGDEHg (ORCPT ); Wed, 4 Jul 2018 00:07:36 -0400 Received: from [192.168.86.59] (c-24-4-125-7.hsd1.ca.comcast.net [24.4.125.7]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 520A1A95; Wed, 4 Jul 2018 04:07:36 +0000 (UTC) Date: Tue, 03 Jul 2018 21:07:32 -0700 User-Agent: K-9 Mail for Android In-Reply-To: <20180704102120.591e1074@canb.auug.org.au> References: <1530186789-28808-1-git-send-email-nmanthey@amazon.de> <1530623539-650-1-git-send-email-nmanthey@amazon.de> <20180703154914.5d3e8f28e1d87e48180073e3@linux-foundation.org> <01151c44-c3f7-c344-8e58-2e6b348960fb@infradead.org> <20180704102120.591e1074@canb.auug.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Subject: Re: [build-check] scripts: add check_build script To: Stephen Rothwell , Randy Dunlap CC: Norbert Manthey , Linus Torvalds , David Woodhouse , linux-kernel@vger.kernel.org From: Andrew Morton Message-ID: <9A8BFC66-8723-4E33-B82F-BDF0DBE8133C@linux-foundation.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On July 3, 2018 5:21:20 PM PDT, Stephen Rothwell wrote: >Hi all, > >On Tue, 3 Jul 2018 16:27:06 -0700 Randy Dunlap >wrote: >> >> On 07/03/2018 03:49 PM, Andrew Morton wrote: >> > On Tue, 3 Jul 2018 15:12:10 +0200 Norbert Manthey > 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.