linux-stable/arch
Len Brown b253149b84 sched/idle/x86: Restore mwait_idle() to fix boot hangs, to improve power savings and to improve performance
In Linux-3.9 we removed the mwait_idle() loop:

  69fb3676df ("x86 idle: remove mwait_idle() and "idle=mwait" cmdline param")

The reasoning was that modern machines should be sufficiently
happy during the boot process using the default_idle() HALT
loop, until cpuidle loads and either acpi_idle or intel_idle
invoke the newer MWAIT-with-hints idle loop.

But two machines reported problems:

 1. Certain Core2-era machines support MWAIT-C1 and HALT only.
    MWAIT-C1 is preferred for optimal power and performance.
    But if they support just C1, cpuidle never loads and
    so they use the boot-time default idle loop forever.

 2. Some laptops will boot-hang if HALT is used,
    but will boot successfully if MWAIT is used.
    This appears to be a hidden assumption in BIOS SMI,
    that is presumably valid on the proprietary OS
    where the BIOS was validated.

       https://bugzilla.kernel.org/show_bug.cgi?id=60770

So here we effectively revert the patch above, restoring
the mwait_idle() loop.  However, we don't bother restoring
the idle=mwait cmdline parameter, since it appears to add
no value.

Maintainer notes:

  For 3.9, simply revert 69fb3676df
  for 3.10, patch -F3 applies, fuzz needed due to __cpuinit use in
  context For 3.11, 3.12, 3.13, this patch applies cleanly

Tested-by: Mike Galbraith <bitbucket@online.de>
Signed-off-by: Len Brown <len.brown@intel.com>
Acked-by: Mike Galbraith <bitbucket@online.de>
Cc: <stable@vger.kernel.org> # 3.9+
Cc: Borislav Petkov <bp@alien8.de>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Ian Malone <ibmalone@gmail.com>
Cc: Josh Boyer <jwboyer@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/345254a551eb5a6a866e048d7ab570fd2193aca4.1389763084.git.len.brown@intel.com
[ Ported to recent kernels. ]
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2015-03-16 11:14:21 +01:00
..
alpha vm: add VM_FAULT_SIGSEGV handling support 2015-01-29 10:51:32 -08:00
arc arc: mm: Fix build failure 2015-01-30 10:31:14 -08:00
arm Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-02-09 14:28:42 -08:00
arm64 Merge branch 'x86-efi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-02-09 17:53:53 -08:00
avr32 vm: add VM_FAULT_SIGSEGV handling support 2015-01-29 10:51:32 -08:00
blackfin arch/blackfin/mach-bf533/boards/stamp.c: add linux/delay.h 2015-01-08 15:10:52 -08:00
c6x net, lib: kill arch_fast_hash library bits 2014-12-10 15:17:46 -05:00
cris vm: add VM_FAULT_SIGSEGV handling support 2015-01-29 10:51:32 -08:00
frv vm: add VM_FAULT_SIGSEGV handling support 2015-01-29 10:51:32 -08:00
hexagon Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rkuo/linux-hexagon-kernel 2014-12-19 17:57:51 -08:00
ia64 vm: add VM_FAULT_SIGSEGV handling support 2015-01-29 10:51:32 -08:00
m32r vm: add VM_FAULT_SIGSEGV handling support 2015-01-29 10:51:32 -08:00
m68k vm: add VM_FAULT_SIGSEGV handling support 2015-01-29 10:51:32 -08:00
metag vm: add VM_FAULT_SIGSEGV handling support 2015-01-29 10:51:32 -08:00
microblaze vm: add VM_FAULT_SIGSEGV handling support 2015-01-29 10:51:32 -08:00
mips Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-02-09 14:28:42 -08:00
mn10300 mm/debug_pagealloc: fix build failure on ppc and some other archs 2015-02-05 13:35:30 -08:00
nios2 nios2: fix unhandled signals 2015-02-09 09:47:05 +08:00
openrisc vm: add VM_FAULT_SIGSEGV handling support 2015-01-29 10:51:32 -08:00
parisc vm: add VM_FAULT_SIGSEGV handling support 2015-01-29 10:51:32 -08:00
powerpc Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-02-09 14:28:42 -08:00
s390 Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-02-09 14:28:42 -08:00
score vm: add VM_FAULT_SIGSEGV handling support 2015-01-29 10:51:32 -08:00
sh vm: add VM_FAULT_SIGSEGV handling support 2015-01-29 10:51:32 -08:00
sparc mm/debug_pagealloc: fix build failure on ppc and some other archs 2015-02-05 13:35:30 -08:00
tile Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-02-09 14:28:42 -08:00
um vm: add VM_FAULT_SIGSEGV handling support 2015-01-29 10:51:32 -08:00
unicore32 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-12-11 14:27:06 -08:00
x86 sched/idle/x86: Restore mwait_idle() to fix boot hangs, to improve power savings and to improve performance 2015-03-16 11:14:21 +01:00
xtensa vm: add VM_FAULT_SIGSEGV handling support 2015-01-29 10:51:32 -08:00
.gitignore
Kconfig