This is the mail archive of the mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ia64 clock_gettime and HP_TIMING

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 â
Version: GnuPG v1.2.2 (GNU/Linux)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]