linux-stable/arch
Igor Mammedov ce4b1b1650 x86/smpboot: Initialize secondary CPU only if master CPU will wait for it
Hang is observed on virtual machines during CPU hotplug,
especially in big guests with many CPUs. (It reproducible
more often if host is over-committed).

It happens because master CPU gives up waiting on
secondary CPU and allows it to run wild. As result
AP causes locking or crashing system. For example
as described here:

  https://lkml.org/lkml/2014/3/6/257

If master CPU have sent STARTUP IPI successfully,
and AP signalled to master CPU that it's ready
to start initialization, make master CPU wait
indefinitely till AP is onlined.

To ensure that AP won't ever run wild, make it
wait at early startup till master CPU confirms its
intention to wait for AP. If AP doesn't respond in 10
seconds, the master CPU will timeout and cancel
AP onlining.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Acked-by: Toshi Kani <toshi.kani@hp.com>
Tested-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: xen-devel@lists.xenproject.org
Link: http://lkml.kernel.org/r/1403266991-12233-1-git-send-email-imammedo@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2014-09-16 11:11:32 +02:00
..
alpha alpha: io: implement relaxed accessor macros for writes 2014-08-29 11:18:45 -07:00
arc ARC: [mm] Fix compilation breakage 2014-09-03 10:08:50 -07:00
arm Fix "xen_add_mach_to_phys_entry: cannot add" problem on xen on arm and 2014-09-12 17:45:27 -07:00
arm64 arm64 fixes for -rc5 2014-09-12 09:53:47 -07:00
avr32 Merge branch 'signal-cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/misc 2014-08-09 09:58:12 -07:00
blackfin Merge branch 'signal-cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/misc 2014-08-09 09:58:12 -07:00
c6x Merge branch 'signal-cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/misc 2014-08-09 09:58:12 -07:00
cris Merge branch 'signal-cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/misc 2014-08-09 09:58:12 -07:00
frv frv: Define cpu_relax_lowlatency() 2014-08-19 09:40:08 -05:00
hexagon flush_icache_range: export symbol to fix build errors 2014-08-29 16:28:17 -07:00
ia64 kexec: remove CONFIG_KEXEC dependency on crypto 2014-08-29 16:28:16 -07:00
m32r Merge branch 'signal-cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/misc 2014-08-09 09:58:12 -07:00
m68k m68k: Wire up memfd_create 2014-09-01 10:28:00 +02:00
metag Metag architecture changes for v3.17 2014-08-13 18:18:09 -06:00
microblaze microblaze: Fix number of syscalls 2014-09-09 13:14:47 +02:00
mips kexec: remove CONFIG_KEXEC dependency on crypto 2014-08-29 16:28:16 -07:00
mn10300 Merge branch 'signal-cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/misc 2014-08-09 09:58:12 -07:00
openrisc Merge branch 'signal-cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/misc 2014-08-09 09:58:12 -07:00
parisc parisc: Implement new LWS CAS supporting 64 bit operations. 2014-09-13 22:40:48 +02:00
powerpc powerpc: Wire up sys_seccomp(), sys_getrandom() and sys_memfd_create() 2014-09-09 19:02:47 +10:00
s390 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2014-09-08 08:27:00 -07:00
score Merge branch 'signal-cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/misc 2014-08-09 09:58:12 -07:00
sh sh: get_user_pages_fast() must flush cache 2014-09-10 15:42:12 -07:00
sparc sparc: Hook up memfd_create system call. 2014-08-13 22:00:09 -07:00
tile flush_icache_range: export symbol to fix build errors 2014-08-29 16:28:17 -07:00
um Merge branch 'signal-cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/misc 2014-08-09 09:58:12 -07:00
unicore32 unicore32: Fix build error 2014-08-31 17:08:12 -07:00
x86 x86/smpboot: Initialize secondary CPU only if master CPU will wait for it 2014-09-16 11:11:32 +02:00
xtensa Xtensa improvements for 3.17: 2014-08-31 17:08:42 -07:00
.gitignore
Kconfig