From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx199.postini.com [74.125.245.199]) by kanga.kvack.org (Postfix) with SMTP id E4F4F6B0006 for ; Thu, 28 Feb 2013 16:27:47 -0500 (EST) Received: from /spool/local by e37.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 28 Feb 2013 14:27:47 -0700 Received: from d03relay02.boulder.ibm.com (d03relay02.boulder.ibm.com [9.17.195.227]) by d03dlp01.boulder.ibm.com (Postfix) with ESMTP id 6A64F1FF0049 for ; Thu, 28 Feb 2013 14:22:52 -0700 (MST) Received: from d03av04.boulder.ibm.com (d03av04.boulder.ibm.com [9.17.195.170]) by d03relay02.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r1SLRbYh030914 for ; Thu, 28 Feb 2013 14:27:38 -0700 Received: from d03av04.boulder.ibm.com (loopback [127.0.0.1]) by d03av04.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r1SLQmun030464 for ; Thu, 28 Feb 2013 14:26:48 -0700 From: Cody P Schafer Subject: [PATCH 11/24] page_alloc: in move_freepages(), skip pages instead of VM_BUG on node differences. Date: Thu, 28 Feb 2013 13:26:08 -0800 Message-Id: <1362086781-16725-2-git-send-email-cody@linux.vnet.ibm.com> In-Reply-To: <1362086781-16725-1-git-send-email-cody@linux.vnet.ibm.com> References: <1362086781-16725-1-git-send-email-cody@linux.vnet.ibm.com> In-Reply-To: <1362084272-11282-1-git-send-email-cody@linux.vnet.ibm.com> References: <1362084272-11282-1-git-send-email-cody@linux.vnet.ibm.com> Sender: owner-linux-mm@kvack.org List-ID: To: Linux MM Cc: Cody P Schafer , David Hansen With dynamic numa, pages are going to be gradully moved from one node to another, causing the page ranges that move_freepages() examines to contain pages that actually belong to another node. When dynamic numa is enabled, we skip these pages instead of VM_BUGing out on them. This additionally moves the VM_BUG_ON() (which detects a change in node) so that it follows the pfn_valid_within() check. Signed-off-by: Cody P Schafer --- mm/page_alloc.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index bbc9b6e..972d7cc 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -964,6 +964,7 @@ int move_freepages(struct zone *zone, struct page *page; unsigned long order; int pages_moved = 0; + int zone_nid = zone_to_nid(zone); #ifndef CONFIG_HOLES_IN_ZONE /* @@ -977,14 +978,24 @@ int move_freepages(struct zone *zone, #endif for (page = start_page; page <= end_page;) { - /* Make sure we are not inadvertently changing nodes */ - VM_BUG_ON(page_to_nid(page) != zone_to_nid(zone)); - if (!pfn_valid_within(page_to_pfn(page))) { page++; continue; } + if (page_to_nid(page) != zone_nid) { +#ifndef CONFIG_DYNAMIC_NUMA + /* + * In the normal case (without Dynamic NUMA), all pages + * in a pageblock should belong to the same zone (and + * as a result all have the same nid). + */ + VM_BUG_ON(page_to_nid(page) != zone_nid); +#endif + page++; + continue; + } + if (!PageBuddy(page)) { page++; continue; -- 1.8.1.1 -- 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