Re: [PATCH 0/2] timekeeping: cleanup _fast_ variety of functions

From: Arnd Bergmann
Date: Tue Jun 25 2019 - 06:18:22 EST


On Tue, Jun 25, 2019 at 10:19 AM Jason A. Donenfeld <Jason@xxxxxxxxx> wrote:
>
> Hi Thomas,
>
> When Arnd and I discussed this prior, he thought it best that I separate
> these two commits out into a separate patchset, because they might
> require additional discussion or consideration from you. They seem
> straightforward enough to me, but if deliberations require me to make
> some tweaks, I'm happy to do so.

One concern I had was whether we want to replace 'fast' with something
else, such as 'in_nmi' that might be less confusing. The current naming
might be easy to confuse between 'fast' and 'coarse'.

Another point might be whether we actually need more than one
kind of accessor for each time domain, given how rarely these are
used. In theory we could have the full set of combinations of fast:
monotonic/real/boottime/raw (but not clocktai) with ktime_t/ns/seconds/ts64
for 16 versions. We currently have four, and you are adding another
four, but not the final eight. I'm not saying this is wrong, but
it feels a bit arbitrary and could use an explanation why you feel that
is the right subset.

For coarse, we have ktime_t and ts64. The _seconds() accessors are
coarse by definition, but we probably don't want to add _ns().
We also don't have the combination of 'raw' with 'coarse' or 'seconds',
as that seems to have no use case.

Arnd