MWAIT C-state hints

Sepherosa Ziehau sepherosa at
Wed Feb 5 05:29:37 PST 2014

Hi all,

I have pushed some changes to enable idle wait's mwait C-state hint
auto tuning.  It will allow you enter much deeper C-state, even when
ACPI does not map its deepest C-state to the deepest cpu specific
C-state (mwait hint).  e.g. on my laptop, w/o power cable, ACPI C3 is
mapped to cpu specific C4 sub-state 0, while the deepest supported cpu
specific C-state is C4 sub-state 1; w/ power cable, there is no ACPI
C3 at all and ACPI C2 is mapped to cpu specific C3 sub-state 0.

You could set following tunable to enable the auto tuning:
sysctl machdep.mwait.cpu_idle_hlt=1
sysctl machdep.mwait.CX.idle=AUTODEEP

You could check how much time cpu specific C-states are entered by:
sysctl machdep.mwait.C[0-7].entered

Best Regards,

Tomorrow Will Never Die

More information about the Users mailing list