speed up port compiling using RAM (tmpfs) ???

Kris Kennaway kris at obsecurity.org
Fri Jan 20 17:53:13 PST 2006


On Fri, Jan 20, 2006 at 08:36:17PM -0500, Sergey Babkin wrote:

> > If (as I said) you impose the correct dependency information.
> > Currently there is no such information provided.
> 
> Ah, so we don't have any reliable information about dependencies 
> between the ports either (not just between files inside each 
> particular port)?  Hm, I think it would present a problem even 
> when building them sequentially.

The port dependency checking of one port upon other ports doesn't
really use the make(1) dependency system.  Instead there is a shell
script in bsd.port.mk that looks for the file listed in the *_DEPENDS
variable and goes and explicitly spawns a new make to build the port
if it is not found.  This is fine for building ports serially, but
it's not trivially parallelizable since it only has local knowledge:

In order to do better you either have to:

1a) construct an enormous make(1) dependency web of the entire ports
collection (in order to have global knowledge and be able to direct
makes to avoid collisions), and

1b) somehow keep it up-to-date each time the ports tree is modified.

or

2) Introduce mutual exclusion to prevent conflicts from two makes
trying to operate on the same port at once.  You also need to
serialize in other places, e.g. modifying the database state in
/var/db.  This won't be as efficient as 1) since the second make will
block instead of going off to build some other dependency in the
meantime, which you could do with 1) if you could manage to implement
it.

Kris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20060120/7ba309f4/attachment.bin


More information about the freebsd-hackers mailing list