Patchwork MIPS: Don't trace irqsoff for idle

login
register
mail settings
Submitter Wu Zhangjin
Date 2010-03-09 04:03:28
Message ID <1268152048-30522-1-git-send-email-wuzhangin@gmail.com>
Download mbox | patch
Permalink /patch/1044/
State Accepted
Delegated to: Ralf Baechle
Headers show

Comments

Wu Zhangjin - 2010-03-09 04:03:28
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(-)

Patch

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) &&