lkml.org 
[lkml]   [2008]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] ftrace: single CPU tracers use CPU clock

* Steven Rostedt <rostedt@goodmis.org> wrote:

> The current ftrace clock uses the sched_clock.c code. This code tries
> to handle cases where the TSC is out of sync between different CPUs.
> Unfortunately, even with insync TSCs, due to drifts between the CPU
> clock and the GTOD clock, we might get some inaccuracy in a single CPU
> trace.
>
> Some tracers (irqsoff, preemptoff, preempirqsoff) only care about a
> trace on a single CPU. This patch changes the ftrace_now (the clock
> reader) from a function call to a function variable. On initialization
> of a tracer, the tracer will be allowed to choose which type of clock
> to use.
>
> Now the irqsoff, preemptoff and preemptirqs off tracers can have
> accurate traces with the local CPU clock without affecting the tracers
> that want the modified clock that tries to keep the different CPU
> clock reads in sync.

this is not a good idea. We want to fix cpu_clock(), not work around any
deficiencies it might have.

Ingo


\
 
 \ /
  Last update: 2008-07-26 14:43    [W:0.070 / U:0.640 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site