Hi list,

Le vendredi 15 décembre 2006 11:50, Martijn van Oosterhout a écrit :
> BTW, doing gettimeofday() without kernel entry is not really possible.
> You could use the cycle counter but it has the problem that if you have
> multiple CPUs you need to calibrate the result. If the CPU goes to
> sleep, there's is no way for the userspace process to know. Only the
> kernel has all the relevent information about what "time" is to get a
> reasonable result.

I remember having played with intel RDTSC (time stamp counter) for some timing 
measurement, but just read from several sources (including linux kernel 
hackers considering its usage for gettimeofday()  implementation) that TSC is 
not an accurate method to have elapsed time information.

May be some others method than gettimeofday() are available (Lamport 
Timestamps, as PGDG may have to consider having a distributed processing 
ready EA in some future), cheaper and accurate?
After all, the discussion, as far as I understand it, is about having a 
accurate measure of duration of events, knowing when they occurred in the day 
does not seem to be the point.

My 2¢, hoping this could be somehow helpfull,
-- 
Dimitri Fontaine
http://www.dalibo.com/

Attachment: pgpEFfqjZSlvL.pgp
Description: PGP signature

Reply via email to