Files
linux/arch/x86/include/asm
Konrad Rzeszutek Wilk e5fd47bfab xen/pm_idle: Make pm_idle be default_idle under Xen.
The idea behind commit d91ee5863b ("cpuidle: replace xen access to x86
pm_idle and default_idle") was to have one call - disable_cpuidle()
which would make pm_idle not be molested by other code.  It disallows
cpuidle_idle_call to be set to pm_idle (which is excellent).

But in the select_idle_routine() and idle_setup(), the pm_idle can still
be set to either: amd_e400_idle, mwait_idle or default_idle.  This
depends on some CPU flags (MWAIT) and in AMD case on the type of CPU.

In case of mwait_idle we can hit some instances where the hypervisor
(Amazon EC2 specifically) sets the MWAIT and we get:

  Brought up 2 CPUs
  invalid opcode: 0000 [#1] SMP

  Pid: 0, comm: swapper Not tainted 3.1.0-0.rc6.git0.3.fc16.x86_64 #1
  RIP: e030:[<ffffffff81015d1d>]  [<ffffffff81015d1d>] mwait_idle+0x6f/0xb4
  ...
  Call Trace:
   [<ffffffff8100e2ed>] cpu_idle+0xae/0xe8
   [<ffffffff8149ee78>] cpu_bringup_and_idle+0xe/0x10
  RIP  [<ffffffff81015d1d>] mwait_idle+0x6f/0xb4
   RSP <ffff8801d28ddf10>

In the case of amd_e400_idle we don't get so spectacular crashes, but we
do end up making an MSR which is trapped in the hypervisor, and then
follow it up with a yield hypercall.  Meaning we end up going to
hypervisor twice instead of just once.

The previous behavior before v3.0 was that pm_idle was set to
default_idle regardless of select_idle_routine/idle_setup.

We want to do that, but only for one specific case: Xen.  This patch
does that.

Fixes RH BZ #739499 and Ubuntu #881076
Reported-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-12-03 10:49:58 -08:00
..
…
…
…
2011-09-25 19:53:00 +03:00
…
2011-08-29 13:44:12 -07:00
2011-08-29 13:44:12 -07:00
…
2011-01-13 08:03:25 -08:00
2011-02-23 22:27:52 +01:00
2009-12-05 09:10:12 -08:00
…
2011-03-18 10:39:30 +01:00
2011-02-14 12:08:28 +01:00
…
…
…
2011-08-04 16:13:49 -07:00
…
2011-09-27 18:08:04 +02:00
2011-05-02 17:24:48 +02:00
…
…
2011-05-09 12:14:29 -07:00
…
2010-02-16 21:22:26 -08:00
…
2011-06-05 21:30:32 +02:00
…
2011-05-16 14:55:57 -04:00
2011-04-18 09:26:48 -07:00
…
2010-10-26 16:52:08 -07:00
…
2011-01-07 10:03:50 -05:00
…
2011-02-24 14:52:18 +01:00
2010-03-10 13:23:34 +01:00
…
…
2010-10-26 16:52:08 -07:00
…
2011-02-23 22:27:52 +01:00
…
2010-08-14 22:26:51 +02:00
2011-07-26 16:49:43 -07:00
…
…
2011-07-22 14:39:50 +09:30
…
2011-05-24 14:33:35 +02:00
2010-06-09 11:12:36 +02:00
2011-07-26 16:49:47 -07:00
…
…
…
2011-07-26 16:49:47 -07:00
…
…
…
2010-05-07 17:13:04 -07:00
…
2011-09-25 19:53:00 +03:00
…
…
2010-06-29 12:12:59 +02:00
…
…
…
…
2011-10-14 09:05:28 -07:00
2011-05-10 15:43:32 -07:00
2010-11-01 15:38:34 -04:00
2010-10-26 16:52:08 -07:00
2011-01-13 17:32:44 -08:00
2011-06-05 21:30:33 +02:00
2011-01-13 17:32:44 -08:00
…
…
2011-03-15 15:34:15 -07:00
2011-07-26 16:49:47 -07:00
2010-02-12 09:42:39 -08:00
2011-03-18 10:39:30 +01:00
…
…
2011-08-29 13:44:12 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2011-07-26 16:49:47 -07:00
…
…
2011-03-23 19:47:18 -07:00
2011-05-20 12:50:29 -07:00
2011-05-20 12:50:29 -07:00
2011-10-31 17:30:44 -07:00
2011-10-31 17:30:44 -07:00
…
…
…
…
…
…
…
2011-06-05 21:30:32 +02:00
…
…
…
…