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.
Unified · Split
| @@ -408,6 +408,7 @@ static int prefer_mwait_c1_over_halt(const struct cpuinfo_x86 *c) · 407 unmodified lines | ||
| 408 | 408 | static void mwait_idle(void) |
| 409 | 409 | { |
| 410 | 410 | if (!current_set_polling_and_test()) { |
| 411 | + trace_cpu_idle_rcuidle(1, smp_processor_id()); | |
| 411 | 412 | if (this_cpu_has(X86_BUG_CLFLUSH_MONITOR)) { |
| 412 | 413 | smp_mb(); /* quirk */ |
| 413 | 414 | clflush((void *)¤t_thread_info()->flags); |
| @@ -419,6 +420,7 @@ static void mwait_idle(void) · 5 unmodified lines | ||
| 419 | 420 | __sti_mwait(0, 0); |
| 420 | 421 | else |
| 421 | 422 | local_irq_enable(); |
| 423 | + trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, smp_processor_id()); | |
| 422 | 424 | } else { |
| 423 | 425 | local_irq_enable(); |
| 424 | 426 | } |