public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@elte.hu>,
	Andrew Morton <akpm@linux-foundation.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Peter Zijlstra <peterz@infradead.org>,
	David Miller <davem@davemloft.net>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Pekka Paalanen <pq@iki.fi>,
	linuxppc-dev@ozlabs.org, Rusty Russell <rusty@rustcorp.com.au>,
	Paul Mackerras <paulus@samba.org>,
	Paul Mundt <lethal@linux-sh.org>,
	Steven Rostedt <srostedt@redhat.com>
Subject: [PATCH 1/7] ftrace, PPC: do not latency trace idle
Date: Sun, 16 Nov 2008 16:24:29 -0500	[thread overview]
Message-ID: <20081116212515.093117788@goodmis.org> (raw)
In-Reply-To: 20081116212428.938752312@goodmis.org

[-- Attachment #1: 0001-ftrace-PPC-do-not-latency-trace-idle.patch --]
[-- Type: text/plain, Size: 1117 bytes --]

Impact: give better timing to latency tracers

When idle is called, interrupts are disabled, but the idle function
will still wake up on an interrupt. The problem is that the interrupt
disabled latency tracer will take this call to idle as a latency.

This patch disables the latency tracing when going into idle.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
CC:  Paul Mackerras <paulus@samba.org>
CC:  Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
 arch/powerpc/kernel/idle.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/kernel/idle.c b/arch/powerpc/kernel/idle.c
index 31982d0..88d9c1d 100644
--- a/arch/powerpc/kernel/idle.c
+++ b/arch/powerpc/kernel/idle.c
@@ -69,10 +69,15 @@ void cpu_idle(void)
 				smp_mb();
 				local_irq_disable();
 
+				/* Don't trace irqs off for idle */
+				stop_critical_timings();
+
 				/* check again after disabling irqs */
 				if (!need_resched() && !cpu_should_die())
 					ppc_md.power_save();
 
+				start_critical_timings();
+
 				local_irq_enable();
 				set_thread_flag(TIF_POLLING_NRFLAG);
 
-- 
1.5.6.5

-- 

  reply	other threads:[~2008-11-16 21:25 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-16 21:24 [PATCH 0/7] Porting dynmaic ftrace to PowerPC Steven Rostedt
2008-11-16 21:24 ` Steven Rostedt [this message]
2008-11-17  3:43   ` [PATCH 1/7] ftrace, PPC: do not latency trace idle Paul Mackerras
2008-11-17 15:43     ` Steven Rostedt
2008-11-16 21:24 ` [PATCH 2/7] ftrace, ppc: convert to new dynamic ftrace arch API Steven Rostedt
2008-11-17  3:57   ` Paul Mackerras
2008-11-17 15:47     ` Steven Rostedt
2008-11-16 21:24 ` [PATCH 3/7] ftrace: powerpc mcount record port Steven Rostedt
2008-11-16 21:24 ` [PATCH 4/7] ftrace, PPC: use probe_kernel API to modify code Steven Rostedt
2008-11-17  4:44   ` Paul Mackerras
2008-11-17 15:51     ` Steven Rostedt
2008-11-16 21:24 ` [PATCH 5/7] ftrace, PPC64: handle module trampolines for dyn ftrace Steven Rostedt
2008-11-17  5:00   ` Paul Mackerras
2008-11-17 16:02     ` Steven Rostedt
2008-11-17 16:18     ` Steven Rostedt
2008-11-16 21:24 ` [PATCH 6/7] ftrace,ppc32: enabled dynamic ftrace Steven Rostedt
2008-11-16 21:24 ` [PATCH 7/7] ftrace,ppc32: dynamic ftrace to handle modules Steven Rostedt
2008-11-16 22:55 ` [PATCH 0/7] Porting dynmaic ftrace to PowerPC Paul Mackerras
2008-11-17 15:42   ` Steven Rostedt
2008-11-17 20:03     ` Steven Rostedt
2008-11-18 13:56     ` Steven Rostedt
2008-11-19  2:38       ` Paul Mackerras
2008-11-19  3:04         ` Steven Rostedt
2008-11-19  9:27           ` Ingo Molnar
2008-11-19 10:38             ` Paul Mackerras
2008-11-19 10:57               ` Ingo Molnar
2008-11-19 11:35                 ` Paul Mackerras
2008-11-19 12:10                 ` Steven Rostedt
2008-11-19 12:15                   ` 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=20081116212515.093117788@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=akpm@linux-foundation.org \
    --cc=benh@kernel.crashing.org \
    --cc=davem@davemloft.net \
    --cc=fweisbec@gmail.com \
    --cc=lethal@linux-sh.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.org \
    --cc=pq@iki.fi \
    --cc=rusty@rustcorp.com.au \
    --cc=srostedt@redhat.com \
    --cc=tglx@linutronix.de \
    /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