login
Header Space

 
 

[PATCH 1/3] mm: Make NR_NODE_MEMBLKS global

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-kernel@...>, <linux-mm@...>
Cc: Ingo Molnar <mingo@...>, Andi Kleen <andi@...>, Yinghai Lu <yhlu.kernel@...>, Andrew Morton <akpm@...>, Linus Torvalds <torvalds@...>
Date: Friday, May 9, 2008 - 11:17 am

Bootmem needs to work on contiguous memory block quantities rather
than whole nodes.  So make the maxium number of blocks and the
resulting number of blocks per node available to generic code like
bootmem.

Signed-off-by: Johannes Weiner <hannes@saeurebad.de>
---

 include/linux/numa.h |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

--- a/include/linux/numa.h
+++ b/include/linux/numa.h
@@ -1,13 +1,17 @@
 #ifndef _LINUX_NUMA_H
 #define _LINUX_NUMA_H
 
-
 #ifdef CONFIG_NODES_SHIFT
-#define NODES_SHIFT     CONFIG_NODES_SHIFT
+#define NODES_SHIFT		CONFIG_NODES_SHIFT
 #else
-#define NODES_SHIFT     0
+#define NODES_SHIFT		0
 #endif
 
-#define MAX_NUMNODES    (1 << NODES_SHIFT)
+#define MAX_NUMNODES		(1 << NODES_SHIFT)
+
+#ifndef NR_NODE_MEMBLKS
+#define NR_NODE_MEMBLKS		MAX_NUMNODES
+#endif
+#define NR_MEMBLKS_PER_NODE	(NR_NODE_MEMBLKS / MAX_NUMNODES)
 
 #endif /* _LINUX_NUMA_H */

-- 

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/3] mm: Make NR_NODE_MEMBLKS global, Johannes Weiner, (Fri May 9, 11:17 am)
speck-geostationary