diff options
author | Cody P Schafer <cody@linux.vnet.ibm.com> | 2013-02-22 19:35:28 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-23 20:50:20 -0500 |
commit | b5e6a5a2724bc9f0b121062ab730d48731ae83e3 (patch) | |
tree | f40b4d3579fde06debac5fd36fa7355c89143cb3 | |
parent | da3649e133948d8b7d8c57b05a33faf62ac2cc7e (diff) |
mm/page_alloc: add informative debugging message in page_outside_zone_boundaries()
Add a debug message which prints when a page is found outside of the
boundaries of the zone it should belong to. Format is:
"page $pfn outside zone [ $start_pfn - $end_pfn ]"
[akpm@linux-foundation.org: s/pr_debug/pr_err/]
Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com>
Cc: David Hansen <dave@linux.vnet.ibm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | mm/page_alloc.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 9614aabee8c5..a40b2f1cac2f 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -247,13 +247,20 @@ static int page_outside_zone_boundaries(struct zone *zone, struct page *page) | |||
247 | int ret = 0; | 247 | int ret = 0; |
248 | unsigned seq; | 248 | unsigned seq; |
249 | unsigned long pfn = page_to_pfn(page); | 249 | unsigned long pfn = page_to_pfn(page); |
250 | unsigned long sp, start_pfn; | ||
250 | 251 | ||
251 | do { | 252 | do { |
252 | seq = zone_span_seqbegin(zone); | 253 | seq = zone_span_seqbegin(zone); |
254 | start_pfn = zone->zone_start_pfn; | ||
255 | sp = zone->spanned_pages; | ||
253 | if (!zone_spans_pfn(zone, pfn)) | 256 | if (!zone_spans_pfn(zone, pfn)) |
254 | ret = 1; | 257 | ret = 1; |
255 | } while (zone_span_seqretry(zone, seq)); | 258 | } while (zone_span_seqretry(zone, seq)); |
256 | 259 | ||
260 | if (ret) | ||
261 | pr_err("page %lu outside zone [ %lu - %lu ]\n", | ||
262 | pfn, start_pfn, start_pfn + sp); | ||
263 | |||
257 | return ret; | 264 | return ret; |
258 | } | 265 | } |
259 | 266 | ||