[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20111214183729.GC2465@netboy.at.omicron.at>
Date: Wed, 14 Dec 2011 19:37:30 +0100
From: Richard Cochran <richardcochran@...il.com>
To: Andy Lutomirski <luto@...capital.net>
Cc: john stultz <johnstul@...ibm.com>, linux-kernel@...r.kernel.org,
Kumar Sundararajan <kumar@...com>,
Arun Sharma <asharma@...com>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...e.hu>,
Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [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@...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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists