From owner-cvs-src@FreeBSD.ORG Fri Nov 12 10:29:00 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4F8F216A4CE for ; Fri, 12 Nov 2004 10:29:00 +0000 (GMT) Received: from mail3.speakeasy.net (mail3.speakeasy.net [216.254.0.203]) by mx1.FreeBSD.org (Postfix) with ESMTP id 01B4B43D45 for ; Fri, 12 Nov 2004 10:29:00 +0000 (GMT) (envelope-from jmg@hydrogen.funkthat.com) Received: (qmail 8018 invoked from network); 12 Nov 2004 10:28:59 -0000 Received: from gate.funkthat.com (HELO hydrogen.funkthat.com) ([69.17.45.168]) (envelope-sender ) by mail3.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 12 Nov 2004 10:28:58 -0000 Received: from hydrogen.funkthat.com (pyjsba@localhost.funkthat.com [127.0.0.1])iACASvB6066093; Fri, 12 Nov 2004 02:28:58 -0800 (PST) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.12.10/8.12.10/Submit) id iACASvWE066092; Fri, 12 Nov 2004 02:28:57 -0800 (PST) Date: Fri, 12 Nov 2004 02:28:57 -0800 From: John-Mark Gurney To: Poul-Henning Kamp Message-ID: <20041112102856.GA57546@funkthat.com> References: <200411120858.iAC8w7ng088956@repoman.freebsd.org> <93962.1100249991@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <93962.1100249991@critter.freebsd.dk> User-Agent: Mutt/1.4.1i X-Operating-System: FreeBSD 4.2-RELEASE i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.bin/make job.c job.h main.c make.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: John-Mark Gurney List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Nov 2004 10:29:00 -0000 Poul-Henning Kamp wrote this message on Fri, Nov 12, 2004 at 09:59 +0100: > Please see: > > http://phk.freebsd.dk/misc/make.png > > It shows the loadaverage for "make -j 12 -s buildworld" with and without > this code. Thanks for doing this! :) Am I to guess/read from the graph that the total time to buildworld was the same w/ and w/o? > In message <200411120858.iAC8w7ng088956@repoman.freebsd.org>, Poul-Henning Kamp > writes: > >phk 2004-11-12 08:58:07 UTC > > > > FreeBSD src repository > > > > Modified files: > > usr.bin/make job.c job.h main.c make.c > > Log: > > Add code to enforce the paralleism count (-j N) for the entire tree > > of submakes spawned during processing. > > > > We create a fifo and stuff one character into it for each job we are > > allowed to run. The name of the fifo is passed to child processes > > in the MAKE_JOBS_FIFO environment variable. > > > > A make which finds this variable on startup will open the fifo and > > only spawn jobs when it managed to read a token from the fifo. > > When the job completes a token is writen back to the fifo. > > > > Slave make processes get one token for free: the one their parent > > make got in order to run them. This makes the make processes > > themselves invisible in the process counts. > > > > The net effect is that "make -j 12 -s buildworld" will start at > > most 12 jobs at the same time, instead of as previously up to > > 65 jobs would get started. > > > > Revision Changes Path > > 1.57 +114 -28 src/usr.bin/make/job.c > > 1.26 +1 -1 src/usr.bin/make/job.h > > 1.96 +2 -0 src/usr.bin/make/main.c > > 1.25 +2 -2 src/usr.bin/make/make.c -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."