From owner-freebsd-arch@FreeBSD.ORG Fri Nov 24 00:30:03 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id ECFA916A407 for ; Fri, 24 Nov 2006 00:30:03 +0000 (UTC) (envelope-from jasone@FreeBSD.org) Received: from canonware.com (24-38-119-150-st.losaca.adelphia.net [24.38.119.150]) by mx1.FreeBSD.org (Postfix) with ESMTP id B885243D49 for ; Fri, 24 Nov 2006 00:29:25 +0000 (GMT) (envelope-from jasone@FreeBSD.org) Received: from [192.168.168.201] (24-38-119-150-st.losaca.adelphia.net [24.38.119.150]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by canonware.com (Postfix) with ESMTP id DA8971298D3; Thu, 23 Nov 2006 16:30:27 -0800 (PST) Message-ID: <45663D0A.7010508@FreeBSD.org> Date: Thu, 23 Nov 2006 16:30:02 -0800 From: Jason Evans User-Agent: Thunderbird 1.5.0.8 (X11/20061105) MIME-Version: 1.0 To: John Birrell References: <20061123232035.GA56985@what-creek.com> In-Reply-To: <20061123232035.GA56985@what-creek.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: arch@freebsd.org Subject: Re: Proposed change to make -j X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Nov 2006 00:30:04 -0000 John Birrell wrote: > Currently 'make -j' reports an error if the number of jobs > isn't specified. > > I'd like to change make(1) to treat -j (without a number) as > meaning "set the number of jobs to the number of processors". > > On sun4v, each processor isn't too powerful and system performance > is only decent when you use all the processors - 32 in my case. > > I've been working on a parallel 'make release' process which > would benefit from having -j set by default. At the moment I > set MAKEFLAGS=j32 in my environment and this achieves the desired > result, but -j would be more general. For gmake, a bare -j says to not limit the number of simultaneous jobs. I don't think that it's a good idea to use a flag name that already has a different (and potentially useful) meaning for gmake. I have some concern that no matter what number of jobs you decide to run simultaneously when your proposed flag is specified (N, N+1, 2N, etc., where N is the number of CPUs), that choice will not be universally useful, since the best choice of argument to -j depends on what 'make' is building. Might it be better to use sysctl(8) in your command line? make -j `sysctl -n hw.ncpu` Jason