From patchwork Sun Nov 16 21:24:29 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 9022 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id A8AFCDE3D9 for ; Mon, 17 Nov 2008 08:27:25 +1100 (EST) X-Original-To: linuxppc-dev@ozlabs.org Delivered-To: linuxppc-dev@ozlabs.org Received: from hrndva-omtalb.mail.rr.com (hrndva-omtalb.mail.rr.com [71.74.56.125]) by ozlabs.org (Postfix) with ESMTP id 4883EDDE19 for ; Mon, 17 Nov 2008 08:25:18 +1100 (EST) Received: from gandalf.stny.rr.com ([74.67.89.75]) by hrndva-omta06.mail.rr.com with ESMTP id <20081116212515.HCMW26861.hrndva-omta06.mail.rr.com@gandalf.stny.rr.com>; Sun, 16 Nov 2008 21:25:15 +0000 Received: from rostedt by gandalf.stny.rr.com with local (Exim 4.69) (envelope-from ) id 1L1p7L-0006oq-6x; Sun, 16 Nov 2008 16:25:15 -0500 Message-Id: <20081116212515.093117788@goodmis.org> References: <20081116212428.938752312@goodmis.org> User-Agent: quilt/0.46-1 Date: Sun, 16 Nov 2008 16:24:29 -0500 From: Steven Rostedt To: linux-kernel@vger.kernel.org Subject: [PATCH 1/7] ftrace, PPC: do not latency trace idle Content-Disposition: inline; filename=0001-ftrace-PPC-do-not-latency-trace-idle.patch Cc: Andrew Morton , Peter Zijlstra , Rusty Russell , Pekka Paalanen , David Miller , linuxppc-dev@ozlabs.org, Steven Rostedt , Paul Mundt , Paul Mackerras , Frederic Weisbecker , Ingo Molnar , Thomas Gleixner X-BeenThere: linuxppc-dev@ozlabs.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org 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 CC: Paul Mackerras CC: Benjamin Herrenschmidt --- 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);