Skip to content

cpu/hotplug: Prevent damage with SMP=y and HOTPLUG_CPU=n

Thomas Gleixner lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2cpu/hotplug: Prevent crash when CPU bringup fails on CONFIG_HOTPLUG_CPU=nkernel/cpu.c+18 -21 reply
2/2x86/smp: Enforce CONFIG_HOTPLUG_CPU when SMP=yarch/x86/Kconfig+1 -71 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchTianyu LanGreg Kroah-Hartman
1/2T-b A-b
2/2A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [patch 0/2] cpu/hotplug: Prevent damage with SMP=y and HOTPLUG_CPU=n

Tianyu reported a crash with SMP=y and HOTPLUG_CPU=n plus 'nosmt' on the kernel command line.

https://lkml.kernel.org/r/[email protected]

The reason is a bug in the hotplug code which does not handle the fact, that HOTPLUG_CPU=n cannot tear down a CPU completely.

Unfortunately HOTPLUG_CPU cannot be enforced as some architectures do not support it at all.

The fix is only a workaround because a full solution is not possible due to the limitations of HOTPLUG_CPU=n. So the CPU stays around in an undead state.

As 'nosmt' has become popular recently, the proper solution for X86 is to enforce HOTPLUG_CPU when SMP is enabled.

Thanks,

tglx
----

 arch/x86/Kconfig |    8 +-------
 kernel/cpu.c     |   20 ++++++++++++++++++--
 2 files changed, 19 insertions(+), 9 deletions(-)