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

From: Dave Hansen
Date: Mon Apr 21 2014 - 14:08:21 EST



From: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>

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.

Signed-off-by: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>
---

b/mm/page_alloc.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff -puN mm/page_alloc.c~range-in-hex mm/page_alloc.c
--- a/mm/page_alloc.c~range-in-hex 2014-04-21 10:11:32.274712151 -0700
+++ b/mm/page_alloc.c 2014-04-21 10:11:32.279712378 -0700
@@ -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;
}
_
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/