Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760501Ab2FDOaR (ORCPT ); Mon, 4 Jun 2012 10:30:17 -0400 Received: from www.linutronix.de ([62.245.132.108]:41671 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753795Ab2FDOaP (ORCPT ); Mon, 4 Jun 2012 10:30:15 -0400 Date: Mon, 4 Jun 2012 16:29:57 +0200 (CEST) From: Thomas Gleixner To: "Srivatsa S. Bhat" cc: peterz@infradead.org, paulmck@linux.vnet.ibm.com, rusty@rustcorp.com.au, mingo@kernel.org, yong.zhang0@gmail.com, akpm@linux-foundation.org, vatsa@linux.vnet.ibm.com, rjw@sisk.pl, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, "Nikunj A. Dadhania" , "Nikunj A. Dadhania" , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Suresh Siddha , Joerg Roedel , Yinghai Lu , Naga Chumbalkar , Don Zickus , Paul Gortmaker , Peter Zijlstra Subject: Re: [PATCH 07/27] x86, smpboot: Use generic SMP booting infrastructure In-Reply-To: <20120601091148.31979.53116.stgit@srivatsabhat.in.ibm.com> Message-ID: References: <20120601090952.31979.24799.stgit@srivatsabhat.in.ibm.com> <20120601091148.31979.53116.stgit@srivatsabhat.in.ibm.com> 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 Content-Length: 2319 Lines: 51 On Fri, 1 Jun 2012, Srivatsa S. Bhat wrote: > From: Nikunj A. Dadhania > > Convert x86 to use the generic framework to boot secondary CPUs. > > Notes: > 1. x86 manipulates the cpu_online_mask under vector_lock. So, while > converting over to the generic smp booting code, override arch_vector_lock() > and arch_vector_unlock() to lock_vector_lock() and unlock_vector_lock() > respectively. > > 2. In smp_callin(), we allow the master to continue as soon as the physical > booting of the secondary processor is done. That is, we don't wait till the > CPU_STARTING notifications are sent. > > Implications: > - This does not alter the order in which the notifications are sent (i.e., > still CPU_STARTING is followed by CPU_ONLINE) because the master waits till > the new cpu is set in the cpu_online_mask before returning to generic code. > > - This approach is better because of 2 reasons: > a. It makes more sense: the master has a timeout for waiting on the > cpu_callin_map - which means we should report back as soon as possible. > The whole idea of having a timeout is to estimate the maximum time that > could be taken for physical booting. This approach separates out the > physical booting vs running CPU hotplug callbacks and reports back to > the master as soon as physical booting is done. How do you deal with the problem that the master does not come back in time? There is a timeout on the booting side as well. I haven't found out why this timeout exists at all, but we need to take care of that and there is a patch on LKML which removes the panic as this can happen on virt. I really wonder whether the hardware for which this timeout stuff was introduced still exists or whether we can simply get rid of it completely. Also the whole callin/callout mask business wants to be in the generic code. It can be replaced completely by cpu_state, at least that's what I was aiming for. There is no need for several variables tracking the same thing in different ways. Thanks, tglx -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/