Skip to content

Commit

Permalink
smp/hotplug: Add state diagram
Browse files Browse the repository at this point in the history
Add a state diagram to clarify when which states are ran where.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: bigeasy@linutronix.de
Cc: efault@gmx.de
Cc: rostedt@goodmis.org
Cc: max.byungchul.park@gmail.com
Link: https://lkml.kernel.org/r/20170920170546.661598270@infradead.org
  • Loading branch information
Peter Zijlstra authored and Thomas Gleixner committed Sep 25, 2017
1 parent e19b205 commit fac1c20
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions include/linux/cpuhotplug.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,24 @@

#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_CREATE_THREADS,
Expand Down

0 comments on commit fac1c20

Please sign in to comment.