lkml.org 
[lkml]   [2008]   [Jun]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: PROBLEM: no cpu MHz in /proc/cpuinfo on 2.6.25.4-rt6
Mark Hounschell wrote:

> If they are not the same how do you know at what rate the tsc is counting.

You don't, at least not easily. The timekeeping subsystem knows, but it
might be unstable, or change with cpu frequency or cpu going idle, etc.

> But back to "how usable is rdtsc for time", is there a
>
> clock_gettime(CLOCK_MONOTONIC, &time) equivalent that can be used in the kernel?

With current kernels it looks like ktime_get_ts() should give exactly
the same results, since it's how that userspace function is implemented.
With a stable tsc it seems like it should give full accuracy.

Chris


\
 
 \ /
  Last update: 2008-06-11 23:43    [W:0.059 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site