9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Ciprian Dorin Craciun <ciprian.craciun@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] mk (from plan9ports) modification time resolution issue?
Date: Tue, 18 Jan 2011 20:24:54 +0200	[thread overview]
Message-ID: <AANLkTimbAAo5Htm4fRCxEsdLtPM+tO45gDi8zvza761k@mail.gmail.com> (raw)
In-Reply-To: <AANLkTi=7WViS_nkFP0yVbAg+E0Mj_EizN7FENoQ4EU3q@mail.gmail.com>

On Tue, Jan 18, 2011 at 18:28, Russ Cox <rsc@swtch.com> wrote:
>>    But the above statement is true unless you have about 367 targets
>> (for quite a small project -- only 2 tiny and 1 larger Erlang
>> applications), which when built takes about 45 seconds (with
>> NPROC=16), and the second time (without touching a single file in the
>> source directory) takes about exactly the same amount (still 45
>> seconds), the third time goes down to 44 seconds, then 43 seconds,
>> then 7 seconds, then 1 second, then 0.6 seconds, then 0.2 seconds,
>> then again 0.2 seconds, again 0.2 seconds, again 0.2, again 0.2, again
>> 0.2, and finally after ONLY 13 builds it finds out that nothing is to
>> be made...
>
> sleep 1; mk
>
> Russ


    `sleep 1 ; mk` doesn't work.

    For example (I put the name of the target and the timestamp in
brackets as in: `target(timestamp)` I assume that each target takes
under one second).

~~~~
initial timestamps: a(2), b(1), c(1), d(1)
rules: b : a | c : b | d : c
or the graph: a -> b -> c -> d

first time I call mk:
    a(2), b(x), c(x), d(x)

second time I call mk after a sleep > 0:
    a(2), b(x), c(x+t1), d(x+t1)

third time I call mk after another sleep > 0:
    a(2), b(x), c(x+t1), d(x+t1+t2)
~~~~

    As a consequence I have to run `sleep 1 ; mk` a number of times
comparable with the longest path from input to output.

    Ciprian.

    P.S.: Even if for example `c -> d` takes 1 minute it is still
going to be runned twice until timestamp(c) > timestamp(b) (which is
only after the first sleep).



      reply	other threads:[~2011-01-18 18:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-07  9:13 Ciprian Dorin Craciun
2011-01-07  9:25 ` erik quanstrom
2011-01-07  9:51   ` Ciprian Dorin Craciun
2011-01-07 10:40     ` Henning Schild
2011-01-13 19:36       ` Ciprian Dorin Craciun
2011-01-18 16:28         ` Russ Cox
2011-01-18 18:24           ` Ciprian Dorin Craciun [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTimbAAo5Htm4fRCxEsdLtPM+tO45gDi8zvza761k@mail.gmail.com \
    --to=ciprian.craciun@gmail.com \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).