From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 21 00:27:19 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E7BB416A425 for ; Sat, 21 Jan 2006 00:27:19 +0000 (GMT) (envelope-from PeterJeremy@optushome.com.au) Received: from fallbackmx02.syd.optusnet.com.au (fallbackmx02.syd.optusnet.com.au [211.29.133.72]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8D89B43D4C for ; Sat, 21 Jan 2006 00:27:17 +0000 (GMT) (envelope-from PeterJeremy@optushome.com.au) Received: from mail01.syd.optusnet.com.au (mail01.syd.optusnet.com.au [211.29.132.182]) by fallbackmx02.syd.optusnet.com.au (8.11.6/8.11.6) with ESMTP id k0L0RGv12990 for ; Sat, 21 Jan 2006 11:27:16 +1100 Received: from cirb503493.alcatel.com.au (c220-239-19-236.belrs4.nsw.optusnet.com.au [220.239.19.236]) by mail01.syd.optusnet.com.au (8.12.11/8.12.11) with ESMTP id k0L0QE8G011152 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Sat, 21 Jan 2006 11:26:15 +1100 Received: from cirb503493.alcatel.com.au (localhost.alcatel.com.au [127.0.0.1]) by cirb503493.alcatel.com.au (8.12.10/8.12.10) with ESMTP id k0L0QEHh032006; Sat, 21 Jan 2006 11:26:14 +1100 (EST) (envelope-from pjeremy@cirb503493.alcatel.com.au) Received: (from pjeremy@localhost) by cirb503493.alcatel.com.au (8.12.10/8.12.9/Submit) id k0L0QEpn032005; Sat, 21 Jan 2006 11:26:14 +1100 (EST) (envelope-from pjeremy) Date: Sat, 21 Jan 2006 11:26:14 +1100 From: Peter Jeremy To: babkin@users.sourceforge.net Message-ID: <20060121002614.GL25397@cirb503493.alcatel.com.au> References: <2209162.1137777933811.JavaMail.root@vms075.mailsrvcs.net> <20060120193741.GC39932@xor.obsecurity.org> <43D15C19.314EC346@verizon.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <43D15C19.314EC346@verizon.net> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.11 Cc: freebsd-hackers@freebsd.org Subject: Re: speed up port compiling using RAM (tmpfs) ??? 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: Sat, 21 Jan 2006 00:27:20 -0000 On Fri, 2006-Jan-20 16:54:33 -0500, Sergey Babkin wrote: >Kris Kennaway wrote: >> It's harder than that, because you need to impose dependency >> information and mutual exclusion between different makes. e.g. they >> can't both be compiling the same port at the same time, which will >> happen if you just do the naive thing. > >That's the part that "make -j" is supposed to take care of, >since it should build in parallel only the targets independent >of each other. It doesn't quite work like that. A single make execution will correctly parallelize independent targets (as long as the makefile dependency tree is correct - which is not true for all ports). The problem occurs when the targets are sub-makes. In this case, you have multiple sub-makes running in parallel with no knowledge of the dependency trees of the other sub-makes. Unless the top-level makefile has full knowledge of all the dependencies (which is not practical), it is quite likely that the sub-makes will collide. -- Peter Jeremy