[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87wqw3rfed.fsf@sejong.aot.lge.com>
Date: Thu, 27 Dec 2012 18:52:10 +0900
From: Namhyung Kim <namhyung@...nel.org>
To: LKML <linux-kernel@...r.kernel.org>
Cc: Namhyung Kim <namhyung.kim@....com>,
Steven Rostedt <rostedt@...dmis.org>,
Fredereic Weisbecker <fweisbec@...il.com>,
Ingo Molnar <mingo@...nel.org>
Subject: Re: [PATCH 2/2] tracing: Use sched_clock_cpu for trace_clock_global
On Thu, 27 Dec 2012 11:49:45 +0900, Namhyung Kim wrote:
> From: Namhyung Kim <namhyung.kim@....com>
>
> For systems have unstable sched_clock, all cpu_clock() does is enable/
> disable local irq during call to sched_clock(). And for stable systems
Oops, I meant s/sched_clock/scheck_clock_cpu/.
Thanks,
Namhyung
> they are same.
>
> As in trace_clock_global(), we already does it for local irq, calling
> sched_clock_cpu() directly would be appropriate.
>
> Cc: Steven Rostedt <rostedt@...dmis.org>
> Cc: Fredereic Weisbecker <fweisbec@...il.com>
> Cc: Ingo Molnar <mingo@...nel.org>
> Signed-off-by: Namhyung Kim <namhyung@...nel.org>
> ---
> kernel/trace/trace_clock.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/trace/trace_clock.c b/kernel/trace/trace_clock.c
> index 394783531cbb..795f077978a8 100644
> --- a/kernel/trace/trace_clock.c
> +++ b/kernel/trace/trace_clock.c
> @@ -86,7 +86,7 @@ u64 notrace trace_clock_global(void)
> local_irq_save(flags);
>
> this_cpu = raw_smp_processor_id();
> - now = cpu_clock(this_cpu);
> + now = sched_clock_cpu(this_cpu);
> /*
> * If in an NMI context then dont risk lockups and return the
> * cpu_clock() time:
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists