From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 14 21:34:49 2006 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 22A3F16A403 for ; Thu, 14 Dec 2006 21:34:49 +0000 (UTC) (envelope-from gad@FreeBSD.org) Received: from smtp7.server.rpi.edu (smtp7.server.rpi.edu [128.113.2.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0DEE443CCE for ; Thu, 14 Dec 2006 21:31:37 +0000 (GMT) (envelope-from gad@FreeBSD.org) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by smtp7.server.rpi.edu (8.13.1/8.13.1) with ESMTP id kBELXBrc007973 for ; Thu, 14 Dec 2006 16:33:13 -0500 Mime-Version: 1.0 Message-Id: In-Reply-To: <20061214185203.GA9701@pix.net> References: <20061214041952.GA7513@dragon.NUXI.org> <20061214185203.GA9701@pix.net> Date: Thu, 14 Dec 2006 16:33:11 -0500 To: freebsd-hackers@FreeBSD.org From: Garance A Drosehn Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-CanItPRO-Stream: default X-RPI-SA-Score: undef - spam-scanning disabled X-Scanned-By: CanIt (www . canit . ca) Cc: Subject: Re: [PATCH] "automated" make -j value X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Dec 2006 21:34:49 -0000 At 1:52 PM -0500 12/14/06, Kurt J. Lidl wrote: >On Wed, Dec 13, 2006, David O'Brien wrote: > > With multi-socket systems becoming more prevalent, and the continued >> increase in cores per processors, I thought it would be nice for >> 'make -j' to gain some automation. >> >> Attached is a patch that makes "-j-" be the same as > > "-j `sysctl -n kern.smp.cpus`" and "-j=" be twice that. > >I think you can do it better than this, by just support >setting the concurrancy level via reading a environmental >variable. Like say "NPROC", which is what CrayOS used, and >also appeared in the BSD/OS pmake varient several years ago. You could have '-j-' use the value of NPROC if that variable is set, and fall back to kern.smp.cpus if NPROC is not set. (it also seems to me this could be called "-j auto" instead of using some single-character for it). I think is not going to make much sense to have a special -j value for "twice ncpu" as we get machines with 12 or 16 CPU's. I doubt there would be many projects which could really take advantage of 32 streams even if there was no performance penalties. And for the few which do exist, the users could just set NPROC if they think that would do them any good. -- Garance Alistair Drosehn = drosehn@rpi.edu Senior Systems Programmer or gad@FreeBSD.org Rensselaer Polytechnic Institute; Troy, NY; USA