]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
x86: disable mwait for AMD family 10H/11H CPUs
authorThomas Gleixner <tglx@linutronix.de>
Thu, 19 Jun 2008 14:34:26 +0000 (16:34 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sun, 22 Jun 2008 05:24:57 +0000 (22:24 -0700)
commitf8bd72872adbf6cc36f370f5c6319085c3be3ec3
treec1dffefa9de5fba91a15174f3063704219a072de
parent384353364373c7c9f8134a847a35e27642cb6dae
x86: disable mwait for AMD family 10H/11H CPUs

back-ported from upstream commit e9623b35599fcdbc00c16535cbefbb4d5578f4ab by Vegard Nossum

The previous revert of 0c07ee38c9d4eb081758f5ad14bbffa7197e1aec left
out the mwait disable condition for AMD family 10H/11H CPUs.

Andreas Herrman said:

It depends on the CPU. For AMD CPUs that support MWAIT this is wrong.
Family 0x10 and 0x11 CPUs will enter C1 on HLT. Powersavings then
depend on a clock divisor and current Pstate of the core.

If all cores of a processor are in halt state (C1) the processor can
enter the C1E (C1 enhanced) state. If mwait is used this will never
happen.

Thus HLT saves more power than MWAIT here.

It might be best to switch off the mwait flag for these AMD CPU
families like it was introduced with commit
f039b754714a422959027cb18bb33760eb8153f0 (x86: Don't use MWAIT on AMD
Family 10)

Re-add the AMD families 10H/11H check and disable the mwait usage for
those.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/x86/kernel/process_32.c
arch/x86/kernel/process_64.c