lkml.org 
[lkml]   [2014]   [May]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v2] tracing: Don't account for cpu idle time with irqsoff tracers
Date
On Tuesday 27 May 2014 19:30:50 Steven Rostedt wrote:
> @@ -144,6 +138,12 @@ static int cpuidle_idle_call(void)
> trace_cpu_idle_rcuidle(next_state, dev->cpu);
>
> /*
> + * During the idle period, stop measuring the
> + * disabled irqs critical sections latencies
> + */
> + stop_critical_timings();
> +
> + /*
> * Enter the idle state previously
> * returned by the governor
> * decision. This function will block
> @@ -154,6 +154,8 @@ static int cpuidle_idle_call(void)
> entered_state = cpuidle_enter(drv, dev,
> next_state);
>
> + start_critical_timings();
> +
> trace_cpu_idle_rcuidle(PWR_EVENT_EXIT,
> dev->cpu);
>

cpuidle_enter() can have quite complex implementations in drivers/cpuidle/,
it's quite possible we have to push down the
stop_critical_timings/start_critical_timings further down here into
the individual drivers.

> @@ -175,8 +177,11 @@ static int cpuidle_idle_call(void)
> * We can't use the cpuidle framework, let's use the default
> * idle routine
> */
> - if (ret)
> + if (ret) {
> + stop_critical_timings();
> arch_cpu_idle();
> + start_critical_timings();
> + }
>
> __current_set_polling();
>
>

This one seems fine on all architectures I've looked at.

Arnd


\
 
 \ /
  Last update: 2014-05-28 09:21    [W:0.568 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site