[Nix-dev] Re: Parallel building support, 1st attempt

Jeff Johnson n3npq at mac.com
Tue Jun 22 20:54:23 CEST 2010


On Jun 22, 2010, at 2:45 PM, Eelco Dolstra wrote:

> Hi,
> 
> On 06/22/2010 08:18 PM, Jeff Johnson wrote:
> 
>> The "portability" issue is that there isn't any clear API to
>> extract the number of CPUS programatically.
> 
> I don't see the portability issue, since this patch doesn't actually try to
> determine the number of CPUs.  Instead it's up to the user to set `build-cores'.
> But even if we would interpret `build-cores = 0' as "guess the number of CPUs",
> it doesn't have to be perfect.  If it doesn't work on some platform, you can
> always set the value manually.
> 

I don't disagree. My suggestion was for "clearly documented source",
not for "portability". If the source is "user sets build-cores"
that's find by me.

But if "you can always set the value manually", why not just
design that in directly without the fiction(s) of #cpus as a
basis for the heuristic. There's nothing at all wrong with
leaving it to the user to configure the build-cores.

There _IS_ however something wrong with benchmarking heuristics
based on a fictional configurable and arguing for/against some
change because of the benchmark results imho.

73 de Jeff




More information about the nix-dev mailing list