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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to