On Wed, Jun 18, 2008 at 7:22 AM, <[EMAIL PROTECTED]> wrote:

> Hi,
>
> when given a list of hosts in DISTCC_HOSTS, e.g.
>
> DISTCC_HOSTS="host1/6 host2/2 host3/3"
>
> The documentation states that the hosts are given priority as specified,
> so host1 is the preferred host. I looked at the distcc code and was
> surprised to find that this "list of preference" is interpreted somewhat
> differently than I expected.


I think you have misread the code.

(Which distcc version are you using?  Though this code hasn't changed
between distcc 2.18.3 and distcc 3.0.)

The code does the following (this is in dcc_lock_one() in src/where.c):

   while (1) {
        for (i_cpu = 0; i_cpu < 50; i_cpu++) {
            for (h = hostlist; h; h = h->next) {

The middle loop is over slot number.  The inner loop is over hosts.
It tries slot 0, host 0, and then slot 0, host 1, and then slot 0, host 2,
etc.
before trying slot 1, host 1, and then slot 1, host 1, and then slot 1, host
2, etc.

(Yes, this code won't work if you have a single host with more than 50
slots!  Patches welcome :)

-- 
Fergus Henderson <[EMAIL PROTECTED]>
__ 
distcc mailing list            http://distcc.samba.org/
To unsubscribe or change options: 
https://lists.samba.org/mailman/listinfo/distcc

Reply via email to