ia64 clock_gettime and HP_TIMING

Ulrich Drepper drepper@redhat.com
Wed Nov 12 18:00:00 GMT 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jes Sorensen wrote:

> I fixed this for glibc-2.2 a while ago by making HP_TIMING() call
> gettimeofday() which is fine (patch below) as with the fast system calls
> on ia64 it's about 150 cycles.

That's bogus.  The HP stands for high precision, nothing gettimeofday
can provide.

The assumption when starting to use itc was that it is synchronized.
And this seems to be the case for reasonable machines.  Just not these
NUMA abominations.  So the solution is: use nothing related to this
clock on NUMA machines.  Maybe build a separate libc version (similar to
x86 without TSC).


> Now my question is what one should do wrt clock_gettime(). The
> implementation in CVS uses HP_TIMING() for CLOCK_PROCESS_CPUTIME_ID,
> however I was curious if I could just switch that to calling
> sys_clock_gettime() directly and then use gettimeofday() as a fall-back?

This question has been obsoleted by the comment above.  You cannot use
gettimeofday or the clock_* syscalls for it.

- -- 
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/snUb2ijCOnn/RHQRAn+uAKDKRhmLBe4nstj+gPqSd5vfUmdp8wCfZWkh
NGazQ38hQ+0siy2qSoRinaM=
=Sowo
-----END PGP SIGNATURE-----



More information about the Libc-hacker mailing list