@@ -1462,10 +1462,11 @@ static void free_heap_pages(
if ( !mfn_valid(page_to_mfn(predecessor)) ||
!page_state_is(predecessor, free) ||
(PFN_ORDER(predecessor) != order) ||
- (page_to_zone(predecessor) != zone) ||
(phys_to_nid(page_to_maddr(predecessor)) != node) )
break;
+ ASSERT(page_to_zone(predecessor) == zone);
+
check_and_stop_scrub(predecessor);
page_list_del(predecessor, &heap(node, zone, order));
@@ -1486,10 +1487,11 @@ static void free_heap_pages(
if ( !mfn_valid(page_to_mfn(successor)) ||
!page_state_is(successor, free) ||
(PFN_ORDER(successor) != order) ||
- (page_to_zone(successor) != zone) ||
(phys_to_nid(page_to_maddr(successor)) != node) )
break;
+ ASSERT(page_to_zone(successor) == zone);
+
check_and_stop_scrub(successor);
/* Update pg's first_dirty if necessary. */
@@ -1773,18 +1775,6 @@ static void init_heap_pages(
unsigned long i;
bool idle_scrub = false;
- /*
- * Keep MFN 0 away from the buddy allocator to avoid crossing zone
- * boundary when merging two buddies.
- */
- if ( !mfn_x(page_to_mfn(pg)) )
- {
- if ( nr_pages-- <= 1 )
- return;
- pg++;
- }
-
-
/*
* Some pages may not go through the boot allocator (e.g reserved
* memory at boot but released just after --- kernel, initramfs,