linux-mips
[Top] [All Lists]

[PATCH] MIPS: Don't trace irqsoff for idle

To: Ralf Baechle <ralf@linux-mips.org>
Subject: [PATCH] MIPS: Don't trace irqsoff for idle
From: Wu Zhangjin <wuzhangjin@gmail.com>
Date: Wed, 10 Mar 2010 00:27:28 +0800
Cc: linux-mips@linux-mips.org, Steven Rostedt <rostedt@goodmis.org>, Frederic Weisbecker <fweisbec@gmail.com>, Ingo Molnar <mingo@redhat.com>, Wu Zhangjin <wuzhangjin@gmail.com>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer; bh=rYOHgFXmHgPDw/W+yk0UbExd6NQrL5qkhiDnUvuwqjk=; b=XPjgWVMPU4FYt4zHHTKf4LliGPz6OZmz6LJhKwXmoA/zzNjGMVQIdQx/mOmKyQzPjo 4gQ9Ig26bAcWkn0/flErUUP2gMMNuP1K/LRAi/IAxxblIzZRViqJbsZTT6AAn3HZRtta /oYnuQqiRuu0vmm97BuDNlf+dZqPHEmhA2xJQ=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=IE4stG8S8mG1QzR+ANhUaCZE091yVZB4bxJcsGrCCEjm01gniZi0gsvfaAF9gwFFPY NqmCysQzrmXlyyGi3WvHHkOFpsrG+f0YMfD5x+P4Hd8q7B5pxigJDqMIKNoNQu/vnIzV jRMfG7xLfSAcGXu8viu/FxL0KRNpJyo0vBKpg=
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
From: Wu Zhangjin <wuzhangjin@gmail.com>

As the X86 platform did in arch/x86/kernel/{process_32.c,process_64.c},
   we also don't trace irqsoff for idle.

If "There's no useful work to be done", we don't care about the irqsoff
duration. If we trace for idle, the max duration of irqsoff will be
always the idle time and eventually make the irqsoff tracer out of
action.

Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
---
 arch/mips/kernel/process.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c
index f3d73e1..87d19dd 100644
--- a/arch/mips/kernel/process.c
+++ b/arch/mips/kernel/process.c
@@ -64,8 +64,13 @@ void __noreturn cpu_idle(void)
 
                        smtc_idle_loop_hook();
 #endif
-                       if (cpu_wait)
+
+                       if (cpu_wait) {
+                               /* Don't trace irqs off for idle */
+                               stop_critical_timings();
                                (*cpu_wait)();
+                               start_critical_timings();
+                       }
                }
 #ifdef CONFIG_HOTPLUG_CPU
                if (!cpu_online(cpu) && !cpu_isset(cpu, cpu_callin_map) &&
-- 
1.7.0.1


<Prev in Thread] Current Thread [Next in Thread>
  • [PATCH] MIPS: Don't trace irqsoff for idle, Wu Zhangjin <=