linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jack Steiner <steiner@sgi.com>
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org, davidm@hpl.hp.com, jbarnes@sgi.com
Subject: [PATCH] - Allow architectures to increase size of MAX_NR_MEMBLKS
Date: Wed, 5 Nov 2003 12:19:11 -0600	[thread overview]
Message-ID: <20031105181911.GA22082@sgi.com> (raw)

This fixes a problem that occurs on system with >64 nodes. 

Previously, MAX_NR_MEMBLKS was defined as BITS_PER_LONG. This
patch allows an architecture to override this definition by
defining a value in the arch-specific asm-xxx/mmzone.h file.





# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#	           ChangeSet	1.1401  -> 1.1402 
#	include/linux/mmzone.h	1.45    -> 1.46   
#	include/asm-ia64/mmzone.h	1.6     -> 1.7    
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/11/05	steiner@attica.americas.sgi.com	1.1402
# Allow architectures to supply their own value for MAX_NR_MEMBLKS.
# The previous value (64) is not large enough for some systems.
# --------------------------------------------
#



diff -Nru a/include/asm-ia64/mmzone.h b/include/asm-ia64/mmzone.h
--- a/include/asm-ia64/mmzone.h	Wed Nov  5 12:07:34 2003
+++ b/include/asm-ia64/mmzone.h	Wed Nov  5 12:07:34 2003
@@ -27,6 +27,8 @@
 # define NR_MEMBLKS		(NR_NODES)
 #endif
 
+#define MAX_NR_MEMBLKS		NR_MEMBLKS
+
 extern unsigned long max_low_pfn;
 
 #define pfn_valid(pfn)		(((pfn) < max_low_pfn) && ia64_pfn_valid(pfn))
diff -Nru a/include/linux/mmzone.h b/include/linux/mmzone.h
--- a/include/linux/mmzone.h	Wed Nov  5 12:07:34 2003
+++ b/include/linux/mmzone.h	Wed Nov  5 12:07:34 2003
@@ -287,12 +287,6 @@
 extern void setup_per_zone_pages_min(void);
 
 
-#ifdef CONFIG_NUMA
-#define MAX_NR_MEMBLKS	BITS_PER_LONG /* Max number of Memory Blocks */
-#else /* !CONFIG_NUMA */
-#define MAX_NR_MEMBLKS	1
-#endif /* CONFIG_NUMA */
-
 #include <linux/topology.h>
 /* Returns the number of the current Node. */
 #define numa_node_id()		(cpu_to_node(smp_processor_id()))
@@ -322,6 +316,14 @@
 #endif
 
 #endif /* !CONFIG_DISCONTIGMEM */
+
+#ifdef CONFIG_NUMA
+#ifndef MAX_NR_MEMBLKS
+#define MAX_NR_MEMBLKS	BITS_PER_LONG /* Max number of Memory Blocks */
+#endif
+#else /* !CONFIG_NUMA */
+#define MAX_NR_MEMBLKS	1
+#endif /* CONFIG_NUMA */
 
 #if NODES_SHIFT > MAX_NODES_SHIFT
 #error NODES_SHIFT > MAX_NODES_SHIFT




-- 
Thanks

Jack Steiner (steiner@sgi.com)          651-683-5302
Principal Engineer                      SGI - Silicon Graphics, Inc.



             reply	other threads:[~2003-11-05 18:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-05 18:19 Jack Steiner [this message]
2003-11-06  8:57 ` [PATCH] - Allow architectures to increase size of MAX_NR_MEMBLKS Christoph Hellwig
2003-11-06 17:15   ` Jack Steiner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20031105181911.GA22082@sgi.com \
    --to=steiner@sgi.com \
    --cc=akpm@osdl.org \
    --cc=davidm@hpl.hp.com \
    --cc=jbarnes@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).