public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* x86-64 NODES_SHIFT compile failure.
@ 2008-05-16 16:54 Dave Jones
  2008-05-16 17:01 ` Dave Jones
  2008-05-16 17:44 ` Mike Travis
  0 siblings, 2 replies; 3+ messages in thread
From: Dave Jones @ 2008-05-16 16:54 UTC (permalink / raw)
  To: Linux Kernel; +Cc: travis

4323838215184f5a2f081e0d17b8d60731b03164 added this line to x86's Kconfig..

 config NODES_SHIFT
        int
+       range 1 15  if X86_64
        default "6" if X86_64
        default "4" if X86_NUMAQ
        default "3"

Selecting 15 causes:

drivers/base/node.c: In function ‘node_read_distance’:
drivers/base/node.c:140: error: size of array ‘type name’ is negative

Should the upper limit be reduced to 14 (which compiles), or should
the BUILD_BUG_ON be changed to somehow cope with this set of changes?

	Dave

-- 
http://www.codemonkey.org.uk

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: x86-64 NODES_SHIFT compile failure.
  2008-05-16 16:54 x86-64 NODES_SHIFT compile failure Dave Jones
@ 2008-05-16 17:01 ` Dave Jones
  2008-05-16 17:44 ` Mike Travis
  1 sibling, 0 replies; 3+ messages in thread
From: Dave Jones @ 2008-05-16 17:01 UTC (permalink / raw)
  To: Linux Kernel, travis

On Fri, May 16, 2008 at 12:54:56PM -0400, Dave Jones wrote:
 > 4323838215184f5a2f081e0d17b8d60731b03164 added this line to x86's Kconfig..
 > 
 >  config NODES_SHIFT
 >         int
 > +       range 1 15  if X86_64
 >         default "6" if X86_64
 >         default "4" if X86_NUMAQ
 >         default "3"
 > 
 > Selecting 15 causes:
 > 
 > drivers/base/node.c: In function ‘node_read_distance’:
 > drivers/base/node.c:140: error: size of array ‘type name’ is negative
 > 
 > Should the upper limit be reduced to 14 (which compiles), or should
 > the BUILD_BUG_ON be changed to somehow cope with this set of changes?
 
(actually that last part should be s/14/9/ )

	Dave

-- 
http://www.codemonkey.org.uk

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: x86-64 NODES_SHIFT compile failure.
  2008-05-16 16:54 x86-64 NODES_SHIFT compile failure Dave Jones
  2008-05-16 17:01 ` Dave Jones
@ 2008-05-16 17:44 ` Mike Travis
  1 sibling, 0 replies; 3+ messages in thread
From: Mike Travis @ 2008-05-16 17:44 UTC (permalink / raw)
  To: Dave Jones, Linux Kernel, travis; +Cc: Ingo Molnar, Andrew Morton

Dave Jones wrote:
> 4323838215184f5a2f081e0d17b8d60731b03164 added this line to x86's Kconfig..
> 
>  config NODES_SHIFT
>         int
> +       range 1 15  if X86_64
>         default "6" if X86_64
>         default "4" if X86_NUMAQ
>         default "3"
> 
> Selecting 15 causes:
> 
> drivers/base/node.c: In function ‘node_read_distance’:
> drivers/base/node.c:140: error: size of array ‘type name’ is negative
> 
> Should the upper limit be reduced to 14 (which compiles), or should
> the BUILD_BUG_ON be changed to somehow cope with this set of changes?
> 
> 	Dave
> 

A later patch changed it to 9 which is the current real limit of NODES_SHIFT
(or at least the fully tested limit).  I think it might be in Ingo's
sched/latest tree, but here it is again.. (cleaned up with MAXSMP not included.)


Subject: [PATCH 1/1] x86: change maximum NR_CPUS to 4096 and MAX_NUMNODES to 512

  * Change the range of NR_CPUS from 2-255 to 2-4096 and change the
    range of MAX_NUMNODES (NODES_SHIFT) from 1-32768 to 1-512.

  * Alter comment about how much each increment of NR_CPUS consumes.
    (This was found by configuring for 256 cpus and then 512 cpus
     and dividing the difference by 256.)

Signed-off-by: Mike Travis <travis@sgi.com>
---
 arch/x86/Kconfig |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

--- linux-2.6-next.orig/arch/x86/Kconfig
+++ linux-2.6-next/arch/x86/Kconfig
@@ -566,18 +566,18 @@ config IOMMU_HELPER
 	def_bool (CALGARY_IOMMU || GART_IOMMU || SWIOTLB)
 
 config NR_CPUS
-	int "Maximum number of CPUs (2-255)"
-	range 2 255
+	int "Maximum number of CPUs (2-4096)"
+	range 2 4096
 	depends on SMP
 	default "32" if X86_NUMAQ || X86_SUMMIT || X86_BIGSMP || X86_ES7000
 	default "8"
 	help
 	  This allows you to specify the maximum number of CPUs which this
-	  kernel will support.  The maximum supported value is 255 and the
+	  kernel will support.  The maximum supported value is 4096 and the
 	  minimum value which makes sense is 2.
 
 	  This is purely to save memory - each supported CPU adds
-	  approximately eight kilobytes to the kernel image.
+	  approximately one kilobyte to the kernel image.
 
 config SCHED_SMT
 	bool "SMT (Hyperthreading) scheduler support"
@@ -969,8 +969,8 @@ config NUMA_EMU
 	  number of nodes. This is only useful for debugging.
 
 config NODES_SHIFT
-	int "Max num nodes shift(1-15)"
-	range 1 15  if X86_64
+	int "Max num nodes shift(1-9)"
+	range 1 9  if X86_64
 	default "6" if X86_64
 	default "4" if X86_NUMAQ
 	default "3"

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-05-16 17:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-16 16:54 x86-64 NODES_SHIFT compile failure Dave Jones
2008-05-16 17:01 ` Dave Jones
2008-05-16 17:44 ` Mike Travis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox