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 09:15:29AM -0800, Andy Lutomirski wrote:
> On Wed, Dec 14, 2011 at 8:48 AM, john stultz <johnstul@us.ibm.com> wrote:

> > On Wed, 2011-12-14 at 08:46 +0100, Richard Cochran wrote:
> >> Believe it or not, people (from the Test and Measurement field) have
> >> already been asking me about having subnanosecond time values from the
> >> kernel.
>
> I'm curious how that works. My personal record is synchronizing time
> across a bunch of computers to within maybe half a nanosecond, but it
> wasn't the *system* clock that I synchronized -- I just calibrated a
> bunch of oscillator phase differences on ADC clocks that I was using.
> I only relied on the system clock being correct to a few tens of
> microseconds, which is easily done with PTP.

On example to take a look at is the White Rabbit project.

It is possible to time stamp events and apply clock corrections at a
very fine resolution, for example with synchronized Ethernet and PTP.

> What about:
>
> struct sys_timeval {
> u64 nanoseconds; /* unsigned. the current time will always be
> after 1970, and those extra 290 years might be nice. */
> u64 padding; /* for later. currently always zero. */
>
> That way, once there's both an implementation and a use case, we can
> implement it. In the mean time, the overhead is probably immeasurably
> low -- it's a single assignment.

Agreed.

> Note that rdtsc isn't good to a nanosecond, let alone sub-nanosecond
> intervals, on any hardware I've ever seen.

But the hardware is coming, sooner or later.

Richard


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