Revised: IA64 HP_TIMING fixes for SMP systems with unsynchronized ITC
Christoph Lameter
christoph@lameter.com
Fri Jun 4 19:55:00 GMT 2004
On Fri, 4 Jun 2004, Ulrich Drepper wrote:
> What is all this? We already check for the sal drifting thing where it
> counts (in clock_getcpuclockid). In no other place is it necessary
> since if the itc is used in these places it is absolutely not critical.
> It's only informational informatin and if somebody runs it on a machine
> where itc is not reliable, it's that person's problem.
Ahh.. I thought that patch by Jes was not accepted but I see that a
variant made it in. The patch results in simply an error on
clock_getcpuclockid() if ITC is not reliable.
However, if ITC is not realiable then also
clock_gettime(CLOCK_PROCESS_CPUTIME_ID) and
clock_gettime(CLOCK_THREAD_CPUTIME_ID) will still return unusable data to
the application. We would need to modify clock_gettime to also return an
error on those.
The proposed patch fixes these cases and would allow
clock_getcpuclockid() to always return CLOCK_CPUTIME_ID and also
clock_gettime(CLOCK_PROCESS_CPUTIME_ID) and
clock_gettime(CLOCK_THREAD_CPUTIME_ID) to work properly.
More information about the Libc-alpha
mailing list