lkml.org 
[lkml]   [2009]   [Oct]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
DateSat, 10 Oct 2009 11:05:20 +0200
FromAvi Kivity <>
SubjectRe: [PATCH RFC] sched: add notifier for process migration
On 10/10/2009 09:14 AM, Peter Zijlstra wrote:
> Why not do something like:
>
> struct {
> u64 tsc;
> u32 aux;
> } tscp = rdtscp();
>
> local_time_info = timeinfo[tscp_cpu(tscp)];
>
> /* yay, consistent tsc and timeinfo !! */
>

First, not all processors support rdtscp. Second, timeinfo might change
at any time due to cpu frequency changes or the entire cpu being
migrated, so we need to loop in any case.

--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.



\
 
 \ /
  Last update: 2009-10-10 11:09    [from the cache]
©2003-2010