Messages in this thread | | | From | Arnd Bergmann <> | Subject | Re: [PATCH v2] tracing: Don't account for cpu idle time with irqsoff tracers | Date | Wed, 28 May 2014 08:44:28 +0200 |
| |
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
| |