Skip to contentSkip to conversation

mm: debug: make bad_range() output more usable and readable

PATCH In review Dave Hansen 2 participants 2 messages Apr 21, 2014 – Apr 22, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mm: debug: make bad_range() output more usable and readable

From: Dave Hansen <[email protected]>

Nobody outputs memory addresses in decimal. PFNs are essentially addresses, and they're gibberish in decimal. Output them in hex.

Also, add the nid and zone name to give a little more context to the message.

---

 b/mm/page_alloc.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
mm/page_alloc.c renamed from mm/page_alloc.c~range-in-hex +3 -2
diff -puN mm/page_alloc.c~range-in-hex mm/page_alloc.c
@@ -261,8 +261,9 @@ static int page_outside_zone_boundaries(
 	} while (zone_span_seqretry(zone, seq));
 
 	if (ret)
-		pr_err("page %lu outside zone [ %lu - %lu ]\n",
-			pfn, start_pfn, start_pfn + sp);
+		pr_err("page 0x%lx outside node %d zone %s [ 0x%lx - 0x%lx ]\n",
+			pfn, zone_to_nid(zone), zone->name,
+			start_pfn, start_pfn + sp);
 
 	return ret;
 }

_

Acked-by on v1 1/1
#1 lore raw
Quoted 10 lines · Dave Hansen

From: Dave Hansen <[email protected]>

Nobody outputs memory addresses in decimal. PFNs are essentially addresses, and they're gibberish in decimal. Output them in hex.

Also, add the nid and zone name to give a little more context to the message.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>