x86/idle: reduce contention on ACPI register accesses
authorJan Beulich <jbeulich@suse.com>
Mon, 11 Nov 2013 10:01:04 +0000 (11:01 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 11 Nov 2013 10:01:04 +0000 (11:01 +0100)
commit178fd279dc138243b514b4ecd48509e4bf5d1ede
tree2ad7f7cd42bcc3d529cb17223ec22486bae68ac5
parentf214ac959a471176e6ea195fb1952429f50ad7de
x86/idle: reduce contention on ACPI register accesses

Other than when they're located in I/O port space, accessing them when
in MMIO space (currently) implies usage of some sort of global lock: In
-unstable this would be due to the use of vmap(), is older trees the
necessary locking was introduced by 2ee9cbf9 ("ACPI: fix
acpi_os_map_memory()"). This contention was observed to result in Dom0
kernel soft lockups during the loading of the ACPI processor driver
there on systems with very many CPU cores.

There are a couple of things being done for this:
- re-order elements of an if() condition so that the register access
  only happens when we really need it
- turn off arbitration disabling only when the first CPU leaves C3
  (paralleling how arbitration disabling gets turned on)
- only set the (global) bus master reload flag once (when the first
  target CPU gets processed)

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
xen/arch/x86/acpi/cpu_idle.c