From: Jeff Layton <jlayton@kernel.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Christian Brauner <brauner@kernel.org>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
Jan Kara <jack@suse.cz>
Subject: Re: [GIT PULL v2] timestamp fixes
Date: Thu, 21 Sep 2023 17:57:02 -0400 [thread overview]
Message-ID: <bc96335d0427d0e7ded2ea7e1d0db55c7e484909.camel@kernel.org> (raw)
In-Reply-To: <CAHk-=wjDAqOs5TFuxxEOSST-5-LJJkAS5cEMrDu-pgiYsrjyNw@mail.gmail.com>
On Thu, 2023-09-21 at 12:46 -0700, Linus Torvalds wrote:
> On Thu, 21 Sept 2023 at 12:28, Linus Torvalds
> <torvalds@linux-foundation.org> wrote:
> >
> > And that's ok when we're talking about times that are kernel running
> > times and we haev a couple of centuries to say "ok, we'll need to make
> > it be a bigger type",
>
> Note that the "couple of centuries" here is mostly the machine uptime,
> not necessarily "we'll need to change the time in the year 2292".
>
Right. On-disk formats are really a different matter anyway, so that
value is only relevant within a single running instance.
> Although we do also have "ktime_get_real()" which is encoding the
> whole "nanoseconds since 1970". That *will* break in 2292.
>
Still pretty much SEP, unless we all end up as cyborgs after this.
> Anyway, regardless, I am *not* suggesting that ktime_t would be useful
> for filesystems, because of this issue.
>
> I *do* suspect that we might consider a "tenth of a microsecond", though.
>
> Resolution-wise, it's pretty much in the "system call time" order of
> magnitude, and if we have Linux filesystems around in the year-31k,
> I'll happily consider it to be a SEP thing at that point ("somebody
> else's problem").
>
FWIW, I'm reworking the multigrain ctime patches for internal consumers.
As part of that, when we present multigrain timestamps to userland via
statx, we'll truncate them at a granularity of (NSEC_PER_SEC / HZ).
So, we could easily do that today since we're already going to be
truncating off more than that for external uses. Having a single word to
deal with would sure be simpler too, particularly since we're using
atomic operations here.
I'll have to think about it. The first step is to get all of the
timestamp handling wrappers in place anyway.
Cheers,
--
Jeff Layton <jlayton@kernel.org>
next prev parent reply other threads:[~2023-09-21 22:01 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-21 11:20 [GIT PULL v2] timestamp fixes Christian Brauner
2023-09-21 18:24 ` Linus Torvalds
2023-09-21 18:51 ` Jeff Layton
2023-09-21 19:28 ` Linus Torvalds
2023-09-21 19:46 ` Linus Torvalds
2023-09-21 21:57 ` Jeff Layton [this message]
2023-09-22 12:28 ` Christian Brauner
2023-09-22 10:19 ` David Sterba
2023-09-23 6:36 ` Amir Goldstein
2023-09-23 17:48 ` Linus Torvalds
2023-09-23 19:30 ` Theodore Ts'o
2023-09-23 20:03 ` Linus Torvalds
2023-09-23 22:07 ` Theodore Ts'o
2023-09-23 23:31 ` Linus Torvalds
2023-09-23 21:29 ` Amir Goldstein
2023-09-24 10:26 ` Christian Brauner
2023-09-25 11:22 ` Jeff Layton
2023-09-25 16:02 ` Linus Torvalds
2023-09-22 12:24 ` Christian Brauner
2023-09-24 8:34 ` Amir Goldstein
2023-09-24 10:15 ` Christian Brauner
2023-09-22 12:16 ` Christian Brauner
2023-09-21 20:10 ` pr-tracker-bot
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=bc96335d0427d0e7ded2ea7e1d0db55c7e484909.camel@kernel.org \
--to=jlayton@kernel.org \
--cc=brauner@kernel.org \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/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).