Re: [PATCH 3/3] timekeeping: add missing _ns functions for coarse accessors

From: Arnd Bergmann
Date: Fri Jun 21 2019 - 10:58:33 EST


On Fri, Jun 21, 2019 at 4:46 PM Jason A. Donenfeld <Jason@xxxxxxxxx> wrote:
> On Fri, Jun 21, 2019 at 4:45 PM Arnd Bergmann <arnd@xxxxxxxx> wrote:
> > I would prefer the 'coarse' on the other side, i.e.
> > ktime_get_coarse_real_ns instead of ktime_get_real_coarse_ns,
> > as this is what we already have with ktime_get_coarse_real_ts64.
> >
> > I originally went with that order to avoid the function sounding
> > "real coarse", although I have to admit that it was before Thomas
> > fixed it in e3ff9c3678b4 ("timekeeping: Repair ktime_get_coarse*()
> > granularity"). ;-)
>
> I can do this, but that means also I'll change get_real_fast to
> get_fast_real, too, in order to be consistent. Is that okay?

I care less about these since ktime_get_real_fast_ns() already
exists. My preference would be leaving alons the _fast_ns()
functions for now, but making everything else consistent instead.

Thomas created the _fast_ns() accessors with a specific application
in mind, and I suppose we don't really want them to be used much
beyond that. I wonder if we should try to come up with a better
name instead of "fast" that makes the purpose clearer and does
not suggest that it's faster to read than the "coarse" version.

Arnd