From: Dave Chinner <david@fromorbit.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Alexander Viro <viro@zeniv.linux.org.uk>,
y2038 Mailman List <y2038@lists.linaro.org>,
Andi Kleen <andi.kleen@intel.com>,
"Darrick J. Wong" <darrick.wong@oracle.com>,
Jeff Layton <jlayton@redhat.com>, Jan Kara <jack@suse.cz>,
Brian Foster <bfoster@redhat.com>,
Deepa Dinamani <deepa.kernel@gmail.com>,
Miklos Szeredi <miklos@szeredi.hu>, Jens Axboe <axboe@kernel.dk>,
Pavel Tatashin <pasha.tatashin@oracle.com>,
Linux FS-devel Mailing List <linux-fsdevel@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] vfs: replace current_kernel_time64 with ktime equivalent
Date: Tue, 26 Jun 2018 10:24:17 +1000 [thread overview]
Message-ID: <20180626002417.GH13748@dastard> (raw)
In-Reply-To: <CAK8P3a0C4hgu9apX8vE6BrqnrU76dHhafY8J-ppPBdhPbxq26Q@mail.gmail.com>
On Fri, Jun 22, 2018 at 03:24:48PM +0200, Arnd Bergmann wrote:
> On Thu, Jun 21, 2018 at 10:23 PM, Dave Chinner <david@fromorbit.com> wrote:
> > On Wed, Jun 20, 2018 at 05:01:24PM +0200, Arnd Bergmann wrote:
>
> >> diff --git a/fs/inode.c b/fs/inode.c
> >> index 2c300e981796..e27bd9334939 100644
> >> --- a/fs/inode.c
> >> +++ b/fs/inode.c
> >> @@ -2133,7 +2133,9 @@ EXPORT_SYMBOL(timespec64_trunc);
> >> */
> >> struct timespec64 current_time(struct inode *inode)
> >> {
> >> - struct timespec64 now = current_kernel_time64();
> >> + struct timespec64 now;
> >> +
> >> + ktime_get_coarse_real_ts64(&now);
> >
> > Can I just say as a filesystem dev who has no idea at all about
> > kernel timer implementations: this is an awful API change. There
> > are hundreds of callers of current_time(), so I'm not going to be
> > the only person looking at this function who has no clue about WTF
> > "ktime_get_coarse_real" actually means or does. Further, this
> > function is not documented, and jumps straight into internal time
> > implementation stuff, so I'm lost straight away if somebody asks me
> > "what does that function do"?. i.e. I have *no clue* what this
> > function returns or why this code uses it.
>
> You definitely have a point about the documentation. I meant to
> fix that as part of the recent rework of the timekeeping.h header
> but haven't finished it, partly because the header is still being
> changed as we get rid of the older interfaces.
The interface documentation should be introduced with the new
interfaces, not left for later as that leaves people like me with no
fucking clue about what the changes actually mean or why they are
being done. Perhaps you'd have done better to explain this API as
an internal implementation of clock_gettime(CLOCK_REALTIME_COARSE),
which is clearly documented in the man page as:
"Use when you need very fast, but not fine-grained timestamps."
Put that comment on ktime_get_coarse_real_ts64(), and almost all the
questions about "WTF does this whacky function do?" go away....
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2018-06-26 0:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-20 15:01 [PATCH] vfs: replace current_kernel_time64 with ktime equivalent Arnd Bergmann
2018-06-20 15:40 ` Andi Kleen
2018-06-20 16:14 ` Arnd Bergmann
2018-06-20 16:19 ` Andi Kleen
2018-06-20 19:35 ` Arnd Bergmann
2018-06-25 13:42 ` Arnd Bergmann
2018-06-21 20:23 ` Dave Chinner
2018-06-22 13:24 ` Arnd Bergmann
2018-06-26 0:24 ` Dave Chinner [this message]
2018-06-26 16:08 ` [Y2038] " Arnd Bergmann
-- strict thread matches above, loose matches on Subject: below --
2018-07-26 13:07 Arnd Bergmann
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=20180626002417.GH13748@dastard \
--to=david@fromorbit.com \
--cc=akpm@linux-foundation.org \
--cc=andi.kleen@intel.com \
--cc=arnd@arndb.de \
--cc=axboe@kernel.dk \
--cc=bfoster@redhat.com \
--cc=darrick.wong@oracle.com \
--cc=deepa.kernel@gmail.com \
--cc=jack@suse.cz \
--cc=jlayton@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=pasha.tatashin@oracle.com \
--cc=viro@zeniv.linux.org.uk \
--cc=y2038@lists.linaro.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).