From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754968Ab3AaVst (ORCPT ); Thu, 31 Jan 2013 16:48:49 -0500 Received: from www.linutronix.de ([62.245.132.108]:59116 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752052Ab3AaVsr (ORCPT ); Thu, 31 Jan 2013 16:48:47 -0500 Date: Thu, 31 Jan 2013 22:48:41 +0100 (CET) From: Thomas Gleixner To: Andrew Morton cc: LKML , Ingo Molnar , Peter Zijlstra , Rusty Russell , Paul McKenney , "Srivatsa S. Bhat" , Arjan van de Veen , Paul Turner , Richard Weinberger , Magnus Damm , Linus Torvalds Subject: Re: [patch 00/40] CPU hotplug rework - episode I In-Reply-To: <20130131122342.31b28664.akpm@linux-foundation.org> Message-ID: References: <20130131120348.372374706@linutronix.de> <20130131122342.31b28664.akpm@linux-foundation.org> User-Agent: Alpine 2.02 (LFD 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 31 Jan 2013, Andrew Morton wrote: > On Thu, 31 Jan 2013 15:44:10 -0000 > Thomas Gleixner wrote: > > > At the end hotplug should run through an array of callbacks on both > > sides with explicit core synchronization points. The ordering should > > look like this: > > > > CPUHP_OFFLINE // Start state. > > CPUHP_PREP_ // Kick CPU into life / let it die > > CPUHP_PREP_ // Get datastructures set up / freed. > > CPUHP_PREP_ // Create threads for cpu > > CPUHP_SYNC // Synchronization point > > CPUHP_INIT_ // Startup/teardown on the CPU (interrupts, timers ...) > > CPUHP_SCHED_ // Unpark/park per cpu local threads on the CPU. > > CPUHP_ENABLE_ // Enable/disable facilities > > CPUHP_SYNC // Synchronization point > > CPUHP_SCHED // Expose/remove CPU from general scheduler. > > CPUHP_ONLINE // Final state > > What does CPUHP_SYNC do? This is a future step which makes sure that the cpu which controls the bringup and the teardown of the hotplugged cpu are synchronizing at some point. Right now, we have this synchronization burried somewhere in the architecture code and of course every arch does it different versus the generic bringup/teardown mechanisms. > Methinks Tejun needed a cc on this lot ;) Not really. The workqueue hotplug scheme is today one of the sanest in that area. Earlier versions have been a prime example of hotplug hell! TJ has converted it via the notifier priorities to a symetric startup/teardown scheme already. So the conversion is a no brainer and no real change. Sure, I should have spent the cycles to add every file owner to the cc list, but due to brain damage caused by decoding the current hotplug maze I skipped that painful exercise relying on you to fix it up for me :) Thanks, tglx