Re: GLIBC IA64 HP_TIMING fixes for SMP systems with unsynchronized ITC

Peter Chubb
2004-06-04T22:06:36Z

>>>>> "David" = David Mosberger <davidm@napali.hpl.hp.com> writes:

David> Does anyone else find it annoying that gettimeofday() only
David> provides micro-second resolution? We can do syscalls
David> significantly faster than that (especially with a light-weight
David> syscall handler). Time for a kernel extension?

Only problem is that we can get high precision, but unless we can also
get access to the NTP daemon's parameters, we don't know the accuracy
of the result.

Dunno about your systems, but mine drift around the real time by a
couple of *milliseconds* so nanosecond accuracy in gettimeofday()
won't buy much.

For a lot of things, however, all one needs is a precise monotonic
clock; absolute accuracy isn't required. Making an alternate internal
do_gettimeofday that takes a timespec instead of a timeval, and using
it for the posix monotonic clock might help here. There's the
standard clock_gettime() function for accessing the values. Or the
posix time code that George Anzinger wrote (who's CCed on this thread
now, because he understands the issues better than I) could definitely
use a monotonic high precision clock.

--
Dr Peter Chubb http://www.gelato.unsw.edu.au peterc AT gelato.unsw.edu.au
The technical we do immediately, the political takes *forever*