diff options
author | Wu Zhangjin <wuzhangjin@gmail.com> | 2010-03-09 17:22:18 +0800 |
---|---|---|
committer | Wu Zhangjin <wuzhangjin@gmail.com> | 2010-03-10 04:38:00 +0800 |
commit | 5a0f82bb6118fb1c51e6516ffc3377d7e5e1ef39 (patch) | |
tree | 2722a9ec06d324db2b28ad7c262760929f500da3 | |
parent | 68739f5e9877339df2594733538e62939bd50cf0 (diff) | |
download | lwn-5a0f82bb6118fb1c51e6516ffc3377d7e5e1ef39.tar.gz lwn-5a0f82bb6118fb1c51e6516ffc3377d7e5e1ef39.zip |
MIPS: Don't trace irqsoff for idle
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 as the idle time and eventually make the irqsoff tracer out of
action.
Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
-rw-r--r-- | arch/mips/kernel/process.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c index f3d73e1831c1..87316fc509a1 100644 --- a/arch/mips/kernel/process.c +++ b/arch/mips/kernel/process.c @@ -64,8 +64,12 @@ 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) && |