lkml.org 
[lkml]   [2011]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC 0/2] ABI for clock_gettime_ns
On Wed, Dec 14, 2011 at 08:23:52AM -0800, john stultz wrote:
> On Wed, 2011-12-14 at 08:20 +0100, Richard Cochran wrote:
> > Michel Hack wrote an article last year detailing how Linux botches the
> > leap second and suggested a more robust way to handle it.
>
> Hmm. Do you have a link to the article?

I don't think it is online. Do you have the magic IEEE access?

http://ieeexplore.ieee.org/xpl/freeabs_all.jsp?arnumber=5609776

> I like the idea of having TAI as a kernel clockid. The hard part is
> getting systems to initialize it properly at boot.
>
> Also part of the issue with leapseconds is that time functions are such
> a hot path, we can't really add extra conditionals checking for leap
> seconds. Instead the leapsecond occurs on the first tick of the
> leapsecond.

The idea would only involve one conditional and one addition:

- System clock represents TAI
- Table of {threshold; offset} values, read mostly, rarely updated
- Table has index pointing to next event

Get time becomes:

1. read system time
2. test threshold
3. apply correction

> More interestingly to me is Google's recent use of slewed leapseconds.
> However, how that would work on a public network is a bit more fuzzy.
> And being able to support both TAI and slewed leapseconds would require
> quite a bit more logic.

Do you mean smoothing the jump over the entire day (or other
interval)? This is also discussed in Hack's paper.

Thanks,
Richard


\
 
 \ /
  Last update: 2011-12-14 19:23    [W:0.087 / U:7.564 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site