bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: race condition with reap_children when $(shell) used


From: Howard Chu
Subject: RE: race condition with reap_children when $(shell) used
Date: Sat, 10 May 2003 16:40:16 -0700

> -----Original Message-----
> From: address@hidden
> [mailto:address@hidden Behalf Of Grant
Taylor

> >>>>> "Howard Chu" <address@hidden> writes:
>
> > Interesting, but the original idea was to use tokens instead of load
> > average to control job spawning. If you're using load average, then
> > there should be no token processing at all.
>
> Well, if the intent is that you use -l xor -j#, then there should be
> code to prevent uers from doing -l and -j#.  I would not expect make
> to leak tokens in any token case; any token leak seems like a clear
> bug to me.

Let me restate that. The intent is to use tokens, period.

> On Linux, at least, you're not likely to get useful behavior from
> something like -j -l4; Linux updates the load once every several
> seconds, so in our environment, the thing will instantly spawn 1500
> jobs and the machine will keel over.  That doesn't seem useful.

By definition, load average is the system load averaged over some interval of
time; this is how it works on all Unix systems. Using load average to control
spawning in make has *never* worked well, because it always results in
spawning a huge number of jobs in a short period, spawning much faster than
can be taken into account by the load average. It is impossible to use the
load average on its own to get good control over job spawning, you always
wind up with a spike that brings a system to its knees. It was a bad idea
from day one.

> IMHO it's entirely reasonable to specify something like -j8 -l4;
> especially when used with things like distcc that offload part of each
> job's work to some other system.  With my patch this works well, make
> runs some variable number of jobs up to 8 and the load hovers right
> around 4.

When you're using tokens the load average specifier is completely
superfluous. You're guaranteed that at most 8 jobs will be active. If you
have 8 jobs running and the load average is less than 4, you won't get more
jobs spawned to bring the load average up to 4. It's completely useless -
harmful when used by itself, and pointless when tokens are in use.

  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc
  Symas: Premier OpenSource Development and Support





reply via email to

[Prev in Thread] Current Thread [Next in Thread]