History

x86/idle: Restore trace_cpu_idle to mwait_idle() calls

Commit b253149b843f ("sched/idle/x86: Restore mwait_idle() to fix boot hangs, to improve power savings and to improve performance") restores mwait_idle(), but the trace_cpu_idle related calls are missing. This causes powertop on my old desktop powered by Intel Core2 E6550 to report zero wakeups and zero events. Add them back to restore the proper behaviour.

Jisheng Zhang committed 11 years ago

Commit e43d0181 parent b5be5b71 file · +2 −0Browse files

Unified · Split

arch/x86/kernel/process.c+2−0
@@ -408,6 +408,7 @@ static int prefer_mwait_c1_over_halt(const struct cpuinfo_x86 *c) · 407 unmodified lines
408408 static void mwait_idle(void)
409409 {
410410 if (!current_set_polling_and_test()) {
411+ trace_cpu_idle_rcuidle(1, smp_processor_id());
411412 if (this_cpu_has(X86_BUG_CLFLUSH_MONITOR)) {
412413 smp_mb(); /* quirk */
413414 clflush((void *)&current_thread_info()->flags);
@@ -419,6 +420,7 @@ static void mwait_idle(void) · 5 unmodified lines
419420 __sti_mwait(0, 0);
420421 else
421422 local_irq_enable();
423+ trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, smp_processor_id());
422424 } else {
423425 local_irq_enable();
424426 }