lkml.org 
[lkml]   [2008]   [Feb]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Can Linux kernel handle unsynced TSC?
On 2/29/08, Peter Zijlstra <peterz@infradead.org> wrote:
>
> On Fri, 2008-02-29 at 16:55 +0800, Zhao Forrest wrote:
> > Sorry for reposting it.
> >
> > For example,
> > 1 rdtsc() is invoked on CPU0
> > 2 process is migrated to CPU1, and rdtsc() is invoked on CPU1
> > 3 if TSC on CPU1 is slower than TSC on CPU0, can kernel guarantee
> > that the second rdtsc() doesn't return a value smaller than the one
> > returned by the first rdtsc()?
>
> No, rdtsc() goes directly to the hardware. You need a (preferably cheap)
> clock abstraction layer on top if you need this.

Thank you for the clarification. I think gettimeofday() is such kind
of clock abstraction layer, am I right?


\
 
 \ /
  Last update: 2008-02-29 15:23    [W:0.333 / U:0.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site