From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760642AbdDSHtw (ORCPT ); Wed, 19 Apr 2017 03:49:52 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:58244 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760376AbdDSHtu (ORCPT ); Wed, 19 Apr 2017 03:49:50 -0400 Date: Wed, 19 Apr 2017 09:49:44 +0200 From: Peter Zijlstra To: Noam Camus Cc: Vineet Gupta , Chris Metcalf , "linux-kernel@vger.kernel.org" , "anna-maria@linutronix.de" , Eitan Rabin , Thomas Gleixner Subject: Re: Reduce Linux boot time on Large scale system Message-ID: <20170419074944.lacscblx2ulhfcd3@hirez.programming.kicks-ass.net> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 04, 2017 at 04:39:06PM +0000, Noam Camus wrote: > Hi Peter & Vineet > > I wish to reduce boot time of my platform ARC/plat-eznps (4K CPUs). > My analysis is that most boot time is spent over cpu_up() for all CPUs > Measurements are about 66mS per CPU and Totally over 4 minutes (I got 800MHz cores). > > I see that smp_init() just iterate over all present cpus one by one. > I wish to know if there was an attempt to optimize this with some parallel work? > > Are you aware of some method / trick that will help me to reduce boot time? > Any suggestion how this can be done? So attempts have been made in the past but Thomas shot them down for being gross hacks (they were). But Thomas has now (mostly) completed rewriting the CPU hotplug machinery and he has at some point outlined means of achieving what you're after. I've added him to Cc so he can correct me where I'm wrong, as I've not looked into this in much detail after he mucked up all I knew about CPU hotplug. Since each CPU is now responsible for its own bootstrap, we can now kick all the CPUs awake without waiting for them to complete the online stage. There might however be code that assumes CPUs come up one at a time, so you'll need to audit for that. Its not going to be a trivial thing.