Date: 09 Oct 2000 23:57:06 -0700 From: asami@FreeBSD.ORG (Satoshi - Ports Wraith - Asami) To: Will Andrews <will@physics.purdue.edu> Cc: Maxim Sobolev <sobomax@FreeBSD.ORG>, bmah@FreeBSD.ORG, Neil Blakey-Milner <nbm@mithrandr.moria.org>, Akinori -Aki- MUSHA <knu@idaemons.org>, freebsd-ports@FreeBSD.ORG, bde@FreeBSD.ORG Subject: Re: PROPOSAL: Use @comment PLIST variable to track where installed packages came from [Was: Enhancement of pkg_version's version comparison routine] Message-ID: <vqchf6l6v5p.fsf@silvia.hip.berkeley.edu> In-Reply-To: Will Andrews's message of "Tue, 10 Oct 2000 00:45:50 -0500" References: <39D9D006.652DC258@FreeBSD.org> <20001003161027.B67542@mithrandr.moria.org> <39D9EE01.7A880665@FreeBSD.org> <200010031657.e93Gvtg10718@bmah-freebsd-0.cisco.com> <39DB17BB.12805565@FreeBSD.org> <200010060426.e964Qvx70814@bmah-freebsd-0.cisco.com> <39DE1A48.C7C8C9CF@FreeBSD.org> <vqc8zrx8nlp.fsf_-_@silvia.hip.berkeley.edu> <20001009213709.M1067@puck.firepipe.net> <vqcog0t706i.fsf@silvia.hip.berkeley.edu> <20001010004549.R1067@puck.firepipe.net>
next in thread | previous in thread | raw e-mail | index | archive | help
* From: Will Andrews <will@physics.purdue.edu> * After quick discussion with Bill, I've decided I'm not MFC'ing to 2.x. * But still 3.x and 4.x. That's good enough for ports. :) * Sorry, no idea about how to do that. Wonder how NetBSD/OpenBSD handled * it. Probably should check. That would be nice. :) By the way, since you are doing make(1) stuff...I have a request. The way make handles targets is suboptimal. Try the following Makefile with -j5 and you'll see what I mean. === .for l in a b c d e .for i in 1 2 3 4 5 all:: ${l}${i} ${l}${i}: @sleep 1 @echo ${l}${i} .endfor .endfor e5: f0 f0: f1 f1: f2 f2: f3 f3: f4 .for i in 0 1 2 3 4 f${i}: @sleep 1 @echo f${i} .endfor === The number of targets is 30, the longest dependency chain is length 6 so make -j5 should be able to complete it in 6 seconds. Yet it takes 10 seconds because it doesn't notice that e5 depends on f0 which depends on f1, etc., until it tries to create e5. I believe this is the way make works. When it is asked to create a job, it will take something from the heap (queue) of stuff to do. If it's not ready to be made (because it has unmade dependencies), drop it on the floor and go get another one. Other than just not taking the length of the chain into account, I think the "drop it on the floor" has a pessimization effect. Reordering the variables in the above Makefile doesn't help at all; for instance, changing it like this: === .for l in e d b c a .for i in 5 4 3 2 1 all:: ${l}${i} ${l}${i}: @sleep 1 @echo ${l}${i} .endfor .endfor f3: f4 f2: f3 f1: f2 f0: f1 e5: f0 .for i in 0 1 2 3 4 f${i}: @sleep 1 @echo f${i} .endfor === you might think it will try to make the f's first but it won't. I think it's because it always adds the dependencies to the end of the queue or something. If you can make it recognize that there is a long chain e5 <- f0 <- ... <- f4 and try to take stuff from the head of that chain while it has slots to fill, the package building cluster will be eternally grateful to you. :) Satoshi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?vqchf6l6v5p.fsf>