From patchwork Mon Oct 20 17:03:30 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Travis X-Patchwork-Id: 5098 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id 726F7489B6 for ; Tue, 21 Oct 2008 04:10:15 +1100 (EST) X-Original-To: linuxppc-dev@ozlabs.org Delivered-To: linuxppc-dev@ozlabs.org Received: from relay.sgi.com (netops-testserver-3-out.sgi.com [192.48.171.28]) by ozlabs.org (Postfix) with ESMTP id 2248BDDE04 for ; Tue, 21 Oct 2008 04:03:26 +1100 (EST) Received: from polaris-admin.engr.sgi.com (polaris-admin.engr.sgi.com [192.102.97.111]) by netops-testserver-3.corp.sgi.com (Postfix) with ESMTP id 943C290907; Mon, 20 Oct 2008 10:03:22 -0700 (PDT) Received: by polaris-admin.engr.sgi.com (Postfix, from userid 5508) id 3BC89517CAFF; Mon, 20 Oct 2008 10:03:21 -0700 (PDT) Message-Id: <20081020170321.119844000@polaris-admin.engr.sgi.com> References: <20081020170319.539427000@polaris-admin.engr.sgi.com> User-Agent: quilt/0.46-1 Date: Mon, 20 Oct 2008 10:03:30 -0700 From: Mike Travis To: Ingo Molnar , Rusty Russell Subject: [PATCH 11/35] x86: enable MAXSMP Content-Disposition: inline; filename=x86:enable-MAXSMP.patch Cc: davej@codemonkey.org.uk, Jeremy Fitzhardinge , Jes Sorensen , IA64 , S390 , peterz@infradead.org, Jack Steiner , linux-kernel@vger.kernel.org, Eric Dumazet , PowerPC , Andi Kleen , Thomas Gleixner , Yinghai Lu , "H. Peter Anvin" , SPARC , Andrew Morton , David Miller X-BeenThere: linuxppc-dev@ozlabs.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org Set MAXSMP to enable a configuration with the maximum amount of CPUS and NODES. Also enables CONFIG_CPUMASK_OFFSTACK which moves cpumask's off the stack (and in structs) when using cpumask_var_t. From: Mike Travis Acked-by: Rusty Russell --- arch/x86/Kconfig | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) --- test-compile.orig/arch/x86/Kconfig +++ test-compile/arch/x86/Kconfig @@ -571,12 +571,20 @@ config IOMMU_HELPER config MAXSMP bool "Configure Maximum number of SMP Processors and NUMA Nodes" - depends on X86_64 && SMP && BROKEN + depends on X86_64 && SMP && DEBUG_KERNEL && EXPERIMENTAL + select CPUMASK_OFFSTACK default n help Configure maximum number of CPUS and NUMA Nodes for this architecture. If unsure, say N. +if MAXSMP +config NR_CPUS + int + default "4096" +endif + +if !MAXSMP config NR_CPUS int "Maximum number of CPUs (2-512)" if !MAXSMP range 2 512 @@ -591,6 +599,14 @@ config NR_CPUS This is purely to save memory - each supported CPU adds approximately eight kilobytes to the kernel image. +endif + +config CPUMASK_OFFSTACK + bool "Force CPU masks off stack" if DEBUG_PER_CPU_MAPS + help + Use dynamic allocation for cpumask_var_t, instead of putting + them on the stack. This is a bit more expensive, but avoids + stack overflow. config SCHED_SMT bool "SMT (Hyperthreading) scheduler support" @@ -1027,10 +1043,16 @@ config NUMA_EMU into virtual nodes when booted with "numa=fake=N", where N is the number of nodes. This is only useful for debugging. +if MAXSMP +config NODES_SHIFT + int + default "9" +endif + +if !MAXSMP config NODES_SHIFT - int "Maximum NUMA Nodes (as a power of 2)" if !MAXSMP + int "Maximum NUMA Nodes (as a power of 2)" range 1 9 if X86_64 - default "9" if MAXSMP default "6" if X86_64 default "4" if X86_NUMAQ default "3" @@ -1038,6 +1060,7 @@ config NODES_SHIFT help Specify the maximum number of NUMA Nodes available on the target system. Increases memory reserved to accomodate various tables. +endif config HAVE_ARCH_BOOTMEM_NODE def_bool y