From: Matt Mackall <mpm@selenic.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: NeilBrown <neilb@suse.de>,
"J. Bruce Fields" <bfields@fieldses.org>,
Andi Kleen <andi@firstfloor.org>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Nanosecond fs timestamp support: sad
Date: Fri, 29 Jul 2011 16:37:01 -0500 [thread overview]
Message-ID: <1311975421.20898.400.camel@calx> (raw)
In-Reply-To: <20110729194903.GA1720@ucw.cz>
On Fri, 2011-07-29 at 21:49 +0200, Pavel Machek wrote:
> Hi!
>
> > > If not, we probably should tell NFSv4 to use timestamps and focus on making
> > > them work well.
> > > ??
> > >
> > > The timestamp used doesn't need to update ever nanosecond. I think if it
> > > were just updated on every userspace->kernel transition (or effective
> > > equivalents inside kernel threads) that would be enough capture all
> > > causality. I wonder how that would be achieved.. I wonder if RCU machinery
> > > could help - doesn't it keep track of when threads schedule ... or something?
> >
> > Sort of.
> >
> > Some observations:
> >
> > - we only need to go to higher resolution when two events happen in the
> > same time quantum
> > - this applies at both the level of seconds and jiffies
> > - if the only file touched in a given quantum gets touched ago, we don't
> > need to update its timestamp if stat wasn't also called on it in this
> > quantum
>
> parse error aroound 'ago'.
This should read:
- if only one file is touched in a given quantum, we don't need to
update its timestamp if stat wasn't called on it in the same quantum
> > - we never need to use a higher resolution than the global
> > min(s_time_gran)
> >
> >
> > For instance, if a machine is idle, except for writing to a single file
> > once a second, 1s resolution suffices.
>
> Are you sure? As soon as you get network communication...
I don't think you can generally compare filesystem timestamps to other
time sources reliably. For instance, network filesystems might have
their own notions of current time.
> > Any time two files are touched in the same second, the second one (and
> > later files) needs jiffies resolution. Similarly, any time two files are
> > touched in the same jiffy, the second one should use gtod().
>
> For make. I don't see how this is globally true.
>
> I do
>
> ( date; > stamp; date ) | ( sleep 5; cat > counterexample )
>
> I know timestamp should be between two dates, but it is not.
You're claiming the timestamp on 'stamp' should be strictly between the
two dates reported?
This is true today if and only if you measure in seconds (and your
filesystem's clock is synced with your local clock). If you measure in
resolutions greater than the filesystem resolution (currently limited to
jiffies) even on a local filesystem, it will be wrong.
--
Mathematics is the supreme nostalgia of our time.
next prev parent reply other threads:[~2011-07-29 21:37 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-21 18:07 Nanosecond fs timestamp support: sad Matt Mackall
2011-07-22 6:01 ` Andi Kleen
2011-07-22 6:33 ` NeilBrown
2011-07-22 19:34 ` Matt Mackall
2011-07-22 20:59 ` Andi Kleen
2011-07-22 21:11 ` Matt Mackall
2011-07-22 21:47 ` Andi Kleen
2011-07-22 22:10 ` J. Bruce Fields
2011-07-22 22:31 ` J. Bruce Fields
2011-07-22 22:59 ` NeilBrown
2011-07-22 23:06 ` J. Bruce Fields
2011-07-22 23:49 ` J. Bruce Fields
2011-07-23 0:07 ` NeilBrown
2011-07-23 0:07 ` Matt Mackall
2011-07-23 1:38 ` J. Bruce Fields
2011-07-23 2:10 ` Trond Myklebust
2011-07-24 1:56 ` Andi Kleen
2011-07-29 19:49 ` Pavel Machek
2011-07-29 21:37 ` Matt Mackall [this message]
2011-07-23 1:13 ` Andreas Dilger
2011-07-25 15:09 ` Paul E. McKenney
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=1311975421.20898.400.camel@calx \
--to=mpm@selenic.com \
--cc=andi@firstfloor.org \
--cc=bfields@fieldses.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=neilb@suse.de \
--cc=pavel@ucw.cz \
/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).