Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932302AbWBKOth (ORCPT ); Sat, 11 Feb 2006 09:49:37 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932301AbWBKOth (ORCPT ); Sat, 11 Feb 2006 09:49:37 -0500 Received: from mtagate3.de.ibm.com ([195.212.29.152]:57701 "EHLO mtagate3.de.ibm.com") by vger.kernel.org with ESMTP id S932302AbWBKOtg (ORCPT ); Sat, 11 Feb 2006 09:49:36 -0500 Date: Sat, 11 Feb 2006 15:49:29 +0100 From: Heiko Carstens To: Andi Kleen Cc: Nathan Lynch , Andrew Morton , Eric Dumazet , riel@redhat.com, linux-kernel@vger.kernel.org, torvalds@osdl.org, mingo@elte.hu, 76306.1226@compuserve.com, wli@holomorphy.com, Paul Jackson , jbeulich@novell.com, Keir Fraser Subject: Re: [PATCH] percpu data: only iterate over possible CPUs Message-ID: <20060211144929.GA4334@osiris.boeblingen.de.ibm.com> References: <200602051959.k15JxoHK001630@hera.kernel.org> <20060209173726.GA39278@muc.de> <20060210100521.GA9307@osiris.boeblingen.de.ibm.com> <200602101113.13632.ak@muc.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200602101113.13632.ak@muc.de> User-Agent: mutt-ng/devel (Linux) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1692 Lines: 34 > > > x86-64 had the same problem, but we now require that you > > > boot with additional_cpus=... for how many you want. Default is 0 > > > (used to be half available CPUs but that lead to confusion) > > > > So introducing the additional_cpus kernel parameter seems to be the way > > to go (for XEN probably too). Even though it seems to be a bit odd if the > > user specifies both maxcpus=... and additional_cpus=... > > With additional_cpus you don't need maxcpus. They are added together. How does x86_64 manage to get 'additional_cpus' parsed early enough? As far as I can see this is done when parse_args() in start_kernel() gets called, but that's after you need the parameter in prefill_possible_map(). IMHO that should be an early_param and you would need to call parse_early_param() from setup_arch(). But then again, maybe I got it all wrong. But the more interesting question is: what do you do if the command line contains both additional_cpus and maxcpus. I was just trying to make some sense of this, but the result is questionable. I ended up with a cpu_possible_map that has 'present cpus' + 'additional_cpus' bits set. And in smp_prepare_cpus I make sure that cpu_present_map has not more than max_cpus bits set. At least that doesn't break the current semantics of the maxcpus parameter. But we're still wasting memory, since it would make sense that the cpu_possible_map shouldn't have more than max_cpus bits set. Heiko - 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/