linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 0/12] x86: Arbitrary CPU hot(un)plug support
@ 2012-01-11 17:04 Fenghua Yu
  2012-01-11 17:04 ` [PATCH v5 01/12] Documentations/cpu-hotplug.tx, kernel-parameters.txt: Add x86 CPU0 online/offline feature Fenghua Yu
                   ` (11 more replies)
  0 siblings, 12 replies; 23+ messages in thread
From: Fenghua Yu @ 2012-01-11 17:04 UTC (permalink / raw)
  To: Ingo Molnar, Thomas Gleixner, H Peter Anvin, Linus Torvalds,
	Andrew Morton, Asit K Mallick, Tony Luck, Arjan van de Ven,
	Suresh B Siddha, Len Brown, Randy Dunlap, Srivatsa S. Bhat,
	Konrad Rzeszutek Wilk, Peter Zijlstra, Chen Gong, linux-kernel,
	linux-pm, x86
  Cc: Fenghua Yu

From: Fenghua Yu <fenghua.yu@intel.com>

CPU0 or BSP (Bootstrap Processor) has been the last processor that can not be
hot removed on x86. This patch set implements CPU0 or BSP online and offline
and removes this obstacle to CPU hotplug.

RAS needs the feature. If socket0 needs to be hotplugged for any reason (any
thread on socket0 is bad, shared cache issue, uncore issue, etc), CPU0 is
required to be offline or hot replaced to keep the system run. For example,
starting with Core Duo, if you have a system that is reporting cache problems
via the "yellow" status in the MCi_STATUS msr, then there is benefit in simply
soft off-lining the cores that share that cache - assuming that leaves you at
least one online core. A single socket system with L3 cache troubles is not
helped - but problems in L1/L2 cache, or on multi-socket systems can be avoided.
They are already being avoided for the cases where CPU0 is not involved.
This patchset can help L1/L2 cache problem in CPU0 or L3 cache problem on the
socket with CPU0 in a multi-socket system.

v5: Add CONFIG_BOOTPARAM_HOTPLUG_CPU0 and CONFIG_DEBUG_HOTPLUG_CPU0. Simplify
duplicate xstate_size init check. Wakeup CPU0 via nmi instead INITs. Add
mcheck_cpu_init when CPU0 online. Change variable bsp_hotpluggable to
cpu0_hotpluggable with __initdata qualifier.

v4: Add __read_mostly for internal bsp_hotpluggable variable. Add my email
address in cpu-hotplug.txt document. A wording change in comment.

v3: Register a pm notifier to check if CPU0 is online before hibernate/suspend.
Small wording changes in document and print info.

v2: Add locking changes between cpu hotplug and hibernate/suspend. Change PIC
irq bound to CPU0 detection.

Fenghua Yu (12):
  Documentations/cpu-hotplug.tx, kernel-parameters.txt: Add x86 CPU0
    online/offline feature
  x86/Kconfig: Add config switch for CPU0 hotplug
  x86/topology.c: Support functions for CPU0 online/offline
  x86/smpboot.c: Don't offline CPU0 if any irq can not be migrated out
    of it and remove CPU0 check in smp_callin()
  x86/power/cpu.c: Don't hibernate/suspend if CPU0 is offline
  x86/head_64.S: Define start_cpu0
  x86/head_32.S: Define start_cpu0
  x86/smpboot.c: Wake up CPU0 via NMI instead of INITs
  x86/common.c: Init CPU0 data during CPU0 online
  x86/mtrr/main.c: Ask the first online CPU to save mtrr
  x86/i387.c: Thread xstate is initialized only on CPU0 once
  x86/topology.c: debug CPU0 hotplug

 Documentation/cpu-hotplug.txt       |   24 +++++++
 Documentation/kernel-parameters.txt |   14 ++++
 arch/x86/Kconfig                    |   44 ++++++++++++
 arch/x86/include/asm/cpu.h          |    1 +
 arch/x86/include/asm/processor.h    |    1 +
 arch/x86/kernel/cpu/common.c        |   17 ++++-
 arch/x86/kernel/cpu/mtrr/main.c     |    9 ++-
 arch/x86/kernel/head_32.S           |   17 ++++-
 arch/x86/kernel/head_64.S           |   15 ++++
 arch/x86/kernel/i387.c              |    6 ++-
 arch/x86/kernel/smpboot.c           |  124 +++++++++++++++++++++++++++++++----
 arch/x86/kernel/topology.c          |   66 +++++++++++++++++--
 arch/x86/power/cpu.c                |   44 ++++++++++++
 13 files changed, 352 insertions(+), 30 deletions(-)


^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2012-01-25 19:01 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-11 17:04 [PATCH v5 0/12] x86: Arbitrary CPU hot(un)plug support Fenghua Yu
2012-01-11 17:04 ` [PATCH v5 01/12] Documentations/cpu-hotplug.tx, kernel-parameters.txt: Add x86 CPU0 online/offline feature Fenghua Yu
2012-01-11 17:04 ` [PATCH v5 02/12] x86/Kconfig: Add config switch for CPU0 hotplug Fenghua Yu
2012-01-11 17:04 ` [PATCH v5 03/12] x86/topology.c: Support functions for CPU0 online/offline Fenghua Yu
2012-01-16 17:35   ` Ben Hutchings
2012-01-24 22:31     ` Yu, Fenghua
2012-01-24 22:52       ` Ben Hutchings
2012-01-24 23:00         ` Yu, Fenghua
2012-01-11 17:04 ` [PATCH v5 04/12] x86/smpboot.c: Don't offline CPU0 if any irq can not be migrated out of it and remove CPU0 check in smp_callin() Fenghua Yu
2012-01-11 17:04 ` [PATCH v5 05/12] x86/power/cpu.c: Don't hibernate/suspend if CPU0 is offline Fenghua Yu
2012-01-11 17:04 ` [PATCH v5 06/12] x86/head_64.S: Define start_cpu0 Fenghua Yu
2012-01-11 17:04 ` [PATCH v5 07/12] x86/head_32.S: " Fenghua Yu
2012-01-11 17:04 ` [PATCH v5 08/12] x86/smpboot.c: Wake up CPU0 via NMI instead of INITs Fenghua Yu
2012-01-12 12:31   ` Brian Gerst
2012-01-11 17:04 ` [PATCH v5 09/12] x86/common.c: Init CPU0 data during CPU0 online Fenghua Yu
2012-01-11 17:04 ` [PATCH v5 10/12] x86/mtrr/main.c: Ask the first online CPU to save mtrr Fenghua Yu
2012-01-12 12:33   ` Brian Gerst
2012-01-16  0:07     ` H. Peter Anvin
2012-01-25 17:58       ` Yu, Fenghua
2012-01-25 19:01       ` Yu, Fenghua
2012-01-11 17:04 ` [PATCH v5 11/12] x86/i387.c: Thread xstate is initialized only on CPU0 once Fenghua Yu
2012-01-11 17:04 ` [PATCH v5 12/12] x86/topology.c: debug CPU0 hotplug Fenghua Yu
2012-01-15 15:24   ` Jiang Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).