Skip to contentSkip to conversation

smp/hotplug fixes for 4.14

GIT PULL Thomas Gleixner 1 participant 1 message Oct 1, 2017 CPU hotplug

lore
Share & tools
lore
#0 lore raw

Linus,

please pull the latest smp-urgent-for-linus git tree from:

git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git smp-urgent-for-linus

This update addresses the fallout of the new lockdep mechanism which covers completions in the CPU hotplug code. The lockdep splats are false positives, but there is no way to annotate that reliably. The solution is to split the completions for CPU up and down, which requires some reshuffling of the failure rollback handling as well.

Thanks,

tglx

------------------>
Peter Zijlstra (7):
smp/hotplug: Add state diagram
smp/hotplug: Allow external multi-instance rollback smp/hotplug: Rewrite AP state machine core
smp/hotplug: Callback vs state-machine consistency smp/hotplug: Differentiate the AP-work lockdep class between up and down smp/hotplug: Differentiate the AP completion between up and down smp/hotplug: Hotplug state fail injection

 include/linux/cpuhotplug.h |  21 +-
 kernel/cpu.c               | 506 ++++++++++++++++++++++++++++++++-------------
 2 files changed, 384 insertions(+), 143 deletions(-)
include/linux/cpuhotplug.h +20 -1
index f24bfb2b9a2d..6d508767e144 100644
@@ -3,8 +3,27 @@
 
 #include <linux/types.h>
 
+/*
+ * CPU-up			CPU-down
+ *
+ * BP		AP		BP		AP
+ *
+ * OFFLINE			OFFLINE
+ *   |				  ^
+ *   v				  |
+ * BRINGUP_CPU->AP_OFFLINE	BRINGUP_CPU  <- AP_IDLE_DEAD (idle thread/play_dead)
+ *		  |				AP_OFFLINE
+ *		  v (IRQ-off)	  ,---------------^
+ *		AP_ONLNE	  | (stop_machine)
+ *		  |		TEARDOWN_CPU <-	AP_ONLINE_IDLE
+ *		  |				  ^
+ *		  v				  |
+ *              AP_ACTIVE			AP_ACTIVE
+ */
+
 enum cpuhp_state {
-	CPUHP_OFFLINE,
+	CPUHP_INVALID = -1,
+	CPUHP_OFFLINE = 0,
 	CPUHP_CREATE_THREADS,
 	CPUHP_PERF_PREPARE,
 	CPUHP_PERF_X86_PREPARE,
kernel/cpu.c +364 -142

781 lines not on this page · raw message