mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Stephen Boyd <sboyd@codeaurora.org>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Ingo Molnar <mingo@redhat.com>,
	linux-kernel@vger.kernel.org, Corey Minyard <cminyard@mvista.com>,
	Stanislav Meduna <stano@meduna.org>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH v2] tracing: Don't account for cpu idle time with irqsoff tracers
Date: Wed, 28 May 2014 08:44:28 +0200	[thread overview]
Message-ID: <5032273.VViPdgvF2W@wuerfel> (raw)
In-Reply-To: <20140527193050.4606a014@gandalf.local.home>

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

  parent reply	other threads:[~2014-05-28  6:44 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-27 20:08 Stephen Boyd
2014-05-27 20:11 ` Arnd Bergmann
2014-05-27 21:48   ` Steven Rostedt
2014-05-27 22:21     ` Stephen Boyd
2014-05-27 23:30       ` Steven Rostedt
2014-05-28  0:11         ` Stephen Boyd
2014-05-28  0:23           ` Stephen Boyd
2014-05-28  0:42           ` Steven Rostedt
2014-05-28  7:24             ` Peter Zijlstra
2014-05-28 17:22               ` John Stultz
2014-05-28  0:25         ` Paul E. McKenney
2014-05-28  6:40         ` Arnd Bergmann
2014-05-28  6:44         ` Arnd Bergmann [this message]
2014-05-28  7:28         ` Peter Zijlstra
2014-05-28 14:09           ` Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5032273.VViPdgvF2W@wuerfel \
    --to=arnd@arndb.de \
    --cc=cminyard@mvista.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=sboyd@codeaurora.org \
    --cc=stano@meduna.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome