From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] validate_abi: build faster by augmenting make with job count Date: Wed, 20 Jul 2016 22:15:28 +0200 Message-ID: <7923871.JAtBDztydg@xps13> References: <1469034588-1847-1-git-send-email-nhorman@tuxdriver.com> <20160720174849.GE28844@hmsreliant.think-freely.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: Neil Horman , Neil Horman , dev@dpdk.org, "Mcnamara, John" To: "Wiles, Keith" Return-path: Received: from mail-wm0-f50.google.com (mail-wm0-f50.google.com [74.125.82.50]) by dpdk.org (Postfix) with ESMTP id 8C64A2BA2 for ; Wed, 20 Jul 2016 22:15:31 +0200 (CEST) Received: by mail-wm0-f50.google.com with SMTP id o80so84496963wme.1 for ; Wed, 20 Jul 2016 13:15:31 -0700 (PDT) In-Reply-To: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2016-07-20 19:47, Wiles, Keith: > On Jul 20, 2016, at 12:48 PM, Neil Horman wrote: > > On Wed, Jul 20, 2016 at 07:40:49PM +0200, Thomas Monjalon wrote: > >> 2016-07-20 13:09, Neil Horman: > >>> From: Neil Horman > >>> +if [ -z "$MAKE_JOBS" ] > >>> +then > >>> + # This counts the number of cpus on the system > >>> + MAKE_JOBS=`lscpu -p=cpu | grep -v "#" | wc -l` > >>> +fi > >> > >> Is lscpu common enough? > >> > > I'm not sure how to answer that. lscpu is part of the util-linux package, which > > is part of any base install. Theres a variant for BSD, but I'm not sure how > > common it is there. > > Neil > > > >> Another acceptable default would be just "-j" without any number. > >> It would make the number of jobs unlimited. > > I think the best is just use -j as it tries to use the correct number of jobs based on the number of cores, right? No Keith, -j alone use as much jobs as it can create, i.e. much more than the number of CPUs. I have no measure but I remember it is less efficient than giving a number based on available CPUs (with a multiply factor to avoid idling between jobs). For a default value, both approaches are fine.