diff options
Diffstat (limited to 'mm/page_alloc.c')
| -rw-r--r-- | mm/page_alloc.c | 23 | 
1 files changed, 6 insertions, 17 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 272c6de1bf4e..ff5484fdbdf9 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -2238,27 +2238,12 @@ static int move_freepages(struct zone *zone,  	unsigned int order;  	int pages_moved = 0; -#ifndef CONFIG_HOLES_IN_ZONE -	/* -	 * page_zone is not safe to call in this context when -	 * CONFIG_HOLES_IN_ZONE is set. This bug check is probably redundant -	 * anyway as we check zone boundaries in move_freepages_block(). -	 * Remove at a later date when no bug reports exist related to -	 * grouping pages by mobility -	 */ -	VM_BUG_ON(pfn_valid(page_to_pfn(start_page)) && -	          pfn_valid(page_to_pfn(end_page)) && -	          page_zone(start_page) != page_zone(end_page)); -#endif  	for (page = start_page; page <= end_page;) {  		if (!pfn_valid_within(page_to_pfn(page))) {  			page++;  			continue;  		} -		/* Make sure we are not inadvertently changing nodes */ -		VM_BUG_ON_PAGE(page_to_nid(page) != zone_to_nid(zone), page); -  		if (!PageBuddy(page)) {  			/*  			 * We assume that pages that could be isolated for @@ -2273,6 +2258,10 @@ static int move_freepages(struct zone *zone,  			continue;  		} +		/* Make sure we are not inadvertently changing nodes */ +		VM_BUG_ON_PAGE(page_to_nid(page) != zone_to_nid(zone), page); +		VM_BUG_ON_PAGE(page_zone(page) != zone, page); +  		order = page_order(page);  		move_to_free_area(page, &zone->free_area[order], migratetype);  		page += 1 << order; @@ -3522,7 +3511,7 @@ bool zone_watermark_ok_safe(struct zone *z, unsigned int order,  static bool zone_allows_reclaim(struct zone *local_zone, struct zone *zone)  {  	return node_distance(zone_to_nid(local_zone), zone_to_nid(zone)) <= -				RECLAIM_DISTANCE; +				node_reclaim_distance;  }  #else	/* CONFIG_NUMA */  static bool zone_allows_reclaim(struct zone *local_zone, struct zone *zone) @@ -5982,7 +5971,7 @@ void __ref memmap_init_zone_device(struct zone *zone,  		}  	} -	pr_info("%s initialised, %lu pages in %ums\n", dev_name(pgmap->dev), +	pr_info("%s initialised %lu pages in %ums\n", __func__,  		size, jiffies_to_msecs(jiffies - start));  }  |