Re: clock_gettime_ns

From: John Stultz
Date: Wed Sep 04 2013 - 19:21:06 EST


On 09/04/2013 04:04 PM, H. Peter Anvin wrote:
> On 09/04/2013 03:59 PM, John Stultz wrote:
>> Also, there's been talk of a slewed-leap-second clockid, basically UTC
>> but around the leapsecond it slows down to absorb the extra second. This
>> means that clockid would have a subsecond offset from TAI.
>>
> Most of what I have heard seem to center around abolishing leap seconds
> entirely. Now, I know that some users do slewed leap seconds as a
> unofficial policy to avoid rare events.
Well, Google does their own slewed leap-seconds internally (using a
modified ntp server to slow CLOCK_REALTIME on clients), and I believe
AIX also provides similar behavior w/ their CLOCK_REALTIME clockid (they
also provide CLOCK_UTC for those who have the need for UTC/leapseconds).
And there's also some occasional talk of trying to standardizing a
leap-second free UTC.

I suspect we have to have an all-of-the-above policy with the kernel. So
we now (as of 3.10) support CLOCK_TAI, as well as the UTC-based
CLOCK_REALTIME. If we can get some agreement on what the
slewed-leapsecond adjustment should look like (have to decide what the
slewing rate/range is: do we absorb the second over the last-hour,
half-hour, 15-minutes before and after?), then we can add such a clockid
(CLOCK_UTC_SLS?) to the kernel as well.

thanks
-john



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/