From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751636AbdITRHV (ORCPT ); Wed, 20 Sep 2017 13:07:21 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:40827 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751377AbdITRHN (ORCPT ); Wed, 20 Sep 2017 13:07:13 -0400 Message-Id: <20170920170546.661598270@infradead.org> User-Agent: quilt/0.63-1 Date: Wed, 20 Sep 2017 19:00:15 +0200 From: Peter Zijlstra To: mingo@kernel.org, tglx@linutronix.de Cc: linux-kernel@vger.kernel.org, peterz@infradead.org, rostedt@goodmis.org, bigeasy@linutronix.de, efault@gmx.de, max.byungchul.park@gmail.com Subject: [PATCH 1/7] smp/hotplug: Add state diagram References: <20170920170014.548896195@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline; filename=peterz-hotplug-1.patch Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add a state diagram to clarify when which states are ran where. Signed-off-by: Peter Zijlstra (Intel) --- include/linux/cpuhotplug.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) --- a/include/linux/cpuhotplug.h +++ b/include/linux/cpuhotplug.h @@ -3,6 +3,24 @@ #include +/* + * 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,