tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: adding functions for easy access to cycle counters

On Thu, Mar 06, 2008 at 04:21:43PM -0500, Thor Lancelot Simon wrote:
> I could use these to remove a number of very expensive gettimeofday()
> calls in OpenSSL.  But how will they work on multiprocessors?

Kernel annotates which cycle counter can be used from userland, can override gettimeofday in libc with a different library
(e.g. on x86) and saves the current value either in a
shared page or via copyout before returning to userland.

Userland reads the current value, calls rdtsc() and computes ToD based
on that. It registers that function as RAS.


Home | Main Index | Thread Index | Old Index