[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: single-threading targets although make was invoked with -jX ?
From: |
Per Jessen |
Subject: |
Re: single-threading targets although make was invoked with -jX ? |
Date: |
Wed, 04 May 2011 21:51:04 +0200 |
User-agent: |
KNode/0.10.4 |
David Boyce wrote:
> On Wed, May 4, 2011 at 11:20 AM, Per Jessen <address@hidden> wrote:
>> yeah, SYNCSH_SERIALIZE is equal to what I do today using this
>> construct:
>>
>> (flock -s 200; some-command $^ $@) 200>/var/lock/some-lockfile
>>
>> It satisfies the single-thread requirement, but in massively parallel
>> runs, several of these often end up waiting for each other. It would
>> be optimal if make knew not to submit more than 1 at a time, I was
>> just wondering if I'd skipped a page in the manual :-)
>
> Could you rephrase this? I can't see a meaningful distinction between
> "waiting for each other" and "submit one at a time". Either way
> they're serialized, no?
Yes, it satisfies the serialization requirement, but if, for instance,
you run a make -j16 and 3 processes get tied up waiting for a fourth,
the jobserver thinks they're running and won't be submitting jobs that
could run. It's purely an optimization issue.
/Per Jessen, Zürich