[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fwd: [RFC]serialize the output of parallel make?
From: |
Chiheng Xu |
Subject: |
Re: Fwd: [RFC]serialize the output of parallel make? |
Date: |
Tue, 3 Aug 2010 09:11:08 +0800 |
On Mon, Aug 2, 2010 at 4:22 PM, Edward Welbourne <address@hidden> wrote:
>> If my guess is not wrong, the semaphore safeguard the consistency of
>> output of one command, not the order of commands.
>
> well, with -j, commands are being run concurrently, so there *isn't* a
> strict ordering of commands to "safeguard", although output shall be
> delivered in roughly the order of completion of commands, with only
> minor disturbances.
>
> Still, if target A is a prerequisite of B, the recipe to make A is
> run, and must complete, before the recipe to make B will be initiated;
> since the recipe for A ends with whatever is ensuring its output comes
> out as an atom, A's output is produced before B's recipe is initiated,
> so you can be sure they appear in the right order. So the only
> ordering property among commands that actually matters *is* preserved.
>
This is not my ideal solution.
My idea is to preserve the order of output of parallel make as if it
is a "serial make".
Modern CPU can issue multiple instructions simultaneously, but
preserve the order of commit to program order. So the instruction
level parallelism of CPU is transparent to programmer.
What I want is transparent "parallel make". Make can issue multiple
shells simultaneously, but print their outputs in the same order as in
a serial make.
--
Chiheng Xu
Wuhan,China