[PATCH/RFC] Memoryless nodes: Suppress redundant "node with no memory" messages

Lee Schermerhorn
2007-07-24T20:35:13Z

Suppress redundant "node with no memory" messages

Against 2.6.22-rc6-mm1 atop Christoph Lameter's memoryless
node series.

get_pfn_range_for_nid() is called multiple times for each node
at boot time. Each time, it will warn about nodes with no
memory, resulting in boot messages like:

Node 0 active with no memory
Node 0 active with no memory
Node 0 active with no memory
Node 0 active with no memory
Node 0 active with no memory
Node 0 active with no memory
On node 0 totalpages: 0
Node 0 active with no memory
Node 0 active with no memory
DMA zone: 0 pages used for memmap
Node 0 active with no memory
Node 0 active with no memory
Normal zone: 0 pages used for memmap
Node 0 active with no memory
Node 0 active with no memory
Movable zone: 0 pages used for memmap

and so on for each memoryless node. Track [in init data]
memoryless nodes that we've already reported to suppress
the redundant messages.

OR, we could eliminate the message altogether? We do
report zero totalpages. Sufficient?

Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com>

mm/page_alloc.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

Index: Linux/mm/page_alloc.c
===================================================================
--- Linux.orig/mm/page_alloc.c 2007-07-13 15:52:22.000000000 -0400
+++ Linux/mm/page_alloc.c 2007-07-24 12:37:35.000000000 -0400
@@ -3081,6 +3081,8 @@ static void __meminit account_node_bound
* with no available memory, a warning is printed and the start and end
* PFNs will be 0.
*/
+static nodemask_t __meminitdata memoryless_nodes;
+
void __meminit get_pfn_range_for_nid(unsigned int nid,
unsigned long *start_pfn, unsigned long *end_pfn)
{
@@ -3094,7 +3096,11 @@ void __meminit get_pfn_range_for_nid(uns
}

if (*start_pfn == -1UL) {
- printk(KERN_WARNING "Node %u active with no memory\n", nid);
+ if (!node_isset(nid, memoryless_nodes)) {
+ printk(KERN_WARNING "Node %u active with no memory\n",
+ nid);
+ node_set(nid, memoryless_nodes);
+ }
*start_pfn = 0;
}