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:
> On Thu, Mar 06, 2008 at 10:38:06AM -0500, Blair Sadewitz wrote:
> > Hello,
> >
> > Does anyone have an opinion on adding functions in
> > src/common/lib/libc/atomic for reading CPU cycle counters? I thought
> > of this while working on a JACK audio package: I've already converted
> > it to use the atomic ops in userland. If I had an MI function to read
> > the cycle counter, e.g. rtdsc on x86, then it could build easily on
> > any platform NetBSD-current supports.
Why does JACK need the cycle counter?
> I could use these to remove a number of very expensive gettimeofday()
> calls in OpenSSL. But how will they work on multiprocessors?
They won't without kernel assistance, including info from the kernel to
say that the TSC is available and reliable on the running machine.
Andrew
Home |
Main Index |
Thread Index |
Old Index