From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755282Ab3AQWyZ (ORCPT ); Thu, 17 Jan 2013 17:54:25 -0500 Received: from e35.co.us.ibm.com ([32.97.110.153]:41390 "EHLO e35.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753123Ab3AQWyW (ORCPT ); Thu, 17 Jan 2013 17:54:22 -0500 From: Cody P Schafer To: Linux MM , David Hansen Cc: LKML , Andrew Morton , Catalin Marinas , Cody P Schafer Subject: [PATCH 6/9] mm/page_alloc: add informative debugging message in page_outside_zone_boundaries() Date: Thu, 17 Jan 2013 14:52:58 -0800 Message-Id: <1358463181-17956-7-git-send-email-cody@linux.vnet.ibm.com> X-Mailer: git-send-email 1.8.0.3 In-Reply-To: <1358463181-17956-1-git-send-email-cody@linux.vnet.ibm.com> References: <1358463181-17956-1-git-send-email-cody@linux.vnet.ibm.com> X-Content-Scanned: Fidelis XPS MAILER x-cbid: 13011722-4834-0000-0000-000002B5BF13 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 ]" Signed-off-by: Cody P Schafer --- mm/page_alloc.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index f8ed277..f1783cf 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -239,13 +239,20 @@ static int page_outside_zone_boundaries(struct zone *zone, struct page *page) int ret = 0; unsigned seq; unsigned long pfn = page_to_pfn(page); + unsigned long sp, start_pfn; do { seq = zone_span_seqbegin(zone); + start_pfn = zone->zone_start_pfn; + sp = zone->spanned_pages; if (!zone_spans_pfn(zone, pfn)) ret = 1; } while (zone_span_seqretry(zone, seq)); + if (ret) + pr_debug("page %lu outside zone [ %lu - %lu ]\n", + pfn, start_pfn, start_pfn + sp); + return ret; } -- 1.8.0.3 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx125.postini.com [74.125.245.125]) by kanga.kvack.org (Postfix) with SMTP id 5544D6B000B for ; Thu, 17 Jan 2013 17:54:19 -0500 (EST) Received: from /spool/local by e36.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 17 Jan 2013 15:54:18 -0700 Received: from d03relay01.boulder.ibm.com (d03relay01.boulder.ibm.com [9.17.195.226]) by d03dlp02.boulder.ibm.com (Postfix) with ESMTP id 37C563E40042 for ; Thu, 17 Jan 2013 15:54:10 -0700 (MST) Received: from d03av03.boulder.ibm.com (d03av03.boulder.ibm.com [9.17.195.169]) by d03relay01.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r0HMsFwf258342 for ; Thu, 17 Jan 2013 15:54:15 -0700 Received: from d03av03.boulder.ibm.com (loopback [127.0.0.1]) by d03av03.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r0HMsFNQ025296 for ; Thu, 17 Jan 2013 15:54:15 -0700 From: Cody P Schafer Subject: [PATCH 6/9] mm/page_alloc: add informative debugging message in page_outside_zone_boundaries() Date: Thu, 17 Jan 2013 14:52:58 -0800 Message-Id: <1358463181-17956-7-git-send-email-cody@linux.vnet.ibm.com> In-Reply-To: <1358463181-17956-1-git-send-email-cody@linux.vnet.ibm.com> References: <1358463181-17956-1-git-send-email-cody@linux.vnet.ibm.com> Sender: owner-linux-mm@kvack.org List-ID: To: Linux MM , David Hansen Cc: LKML , Andrew Morton , Catalin Marinas , Cody P Schafer 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 ]" Signed-off-by: Cody P Schafer --- mm/page_alloc.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index f8ed277..f1783cf 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -239,13 +239,20 @@ static int page_outside_zone_boundaries(struct zone *zone, struct page *page) int ret = 0; unsigned seq; unsigned long pfn = page_to_pfn(page); + unsigned long sp, start_pfn; do { seq = zone_span_seqbegin(zone); + start_pfn = zone->zone_start_pfn; + sp = zone->spanned_pages; if (!zone_spans_pfn(zone, pfn)) ret = 1; } while (zone_span_seqretry(zone, seq)); + if (ret) + pr_debug("page %lu outside zone [ %lu - %lu ]\n", + pfn, start_pfn, start_pfn + sp); + return ret; } -- 1.8.0.3 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org