Skip to content

Extend mwait idle to optimize away CAL and RES interrupts to an idle CPU -v2

Venkatesh Pallipadi lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 2 repliesIn review

Changes in v1 from the cover letter

Moved the changes into arch specific code as per PeterZ suggestion (Mostly) Got rid of new per cpu state logic in favor of TIF flag bits

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4tile, ia64, x86: TS_POLLING cleanuparch/ia64/include/asm/thread_info.h arch/ia64/kernel/process.c arch/tile/include/asm/thread_info.h +8 more+36 -750 replies
2/4x86: Mwait idle optimization to avoid CAL+RES IPIs -v2arch/x86/include/asm/ipiless_wake.h arch/x86/include/asm/thread_info.h arch/x86/kernel/acpi/cstate.c +3 more+104 -20 replies
3/4x86: Extend IPIless wake to C1_mwait and poll_idlearch/x86/kernel/process.c+8 -30 replies
4/4x86: Optimize try_ipiless_wakeup avoid idle task lookuparch/x86/include/asm/ipiless_wake.h arch/x86/kernel/smpboot.c+8 -30 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] Extend mwait idle to optimize away CAL and RES interrupts to an idle CPU -v2

Addressed various comments to the previous version. I did have to avoid x86 smpboot cleanup that Ingo suggested as that did not seem trivial to me :-). I also separated out the change that does percpu idle task caching. That change does provide a measurable gain to the IPI sender overhead.

Previous versions
* RFC - https://lkml.org/lkml/2012/2/6/357
* v1 - https://lkml.org/lkml/2012/2/22/512

Changes since previous versions:
RFC to v1
Moved the changes into arch specific code as per PeterZ suggestion (Mostly) Got rid of new per cpu state logic in favor of TIF flag bits

v1 to v2
Generic TS_POLLING cleanup
Really really no change to generic code (other than TS_POLLING cleanup) Single bit in TIF flags. Had to get rid of micro optimization of avoiding
second IPI to a CPU when there is already one pending, in favor of keeping code simple and faster in common case.
Add irq_enter irq_exit around pending interrupt handlers Extended the optimization to cover C1 mwait() and poll_idle()