Message ID | 20200204143010.5117-1-stewart.hildebrand@dornerworks.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | [XEN] Check zone before merging adjacent blocks in heap | expand |
On Tuesday, February 4, 2020 9:30 AM, Stewart Hildebrand wrote: >diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c >index 97902d42c1..7d39dd5be0 100644 >--- a/xen/common/page_alloc.c >+++ b/xen/common/page_alloc.c >@@ -1462,6 +1462,7 @@ static void free_heap_pages( > if ( !mfn_valid(page_to_mfn(predecessor)) || > !page_state_is(predecessor, free) || > (PFN_ORDER(predecessor) != order) || >+ (page_to_zone(pg-mask) != zone) || It seems it would be more consistent with the surrounding code we did s/pg-mask/predecessor/ > (phys_to_nid(page_to_maddr(predecessor)) != node) ) > break; > >@@ -1485,6 +1486,7 @@ static void free_heap_pages( > if ( !mfn_valid(page_to_mfn(successor)) || > !page_state_is(successor, free) || > (PFN_ORDER(successor) != order) || >+ (page_to_zone(pg+mask) != zone) || Similarly, s/pg+mask/successor/ > (phys_to_nid(page_to_maddr(successor)) != node) ) > break; > >-- >2.25.0 > > >_______________________________________________ >Xen-devel mailing list >Xen-devel@lists.xenproject.org >https://lists.xenproject.org/mailman/listinfo/xen-devel
diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c index 97902d42c1..7d39dd5be0 100644 --- a/xen/common/page_alloc.c +++ b/xen/common/page_alloc.c @@ -1462,6 +1462,7 @@ static void free_heap_pages( if ( !mfn_valid(page_to_mfn(predecessor)) || !page_state_is(predecessor, free) || (PFN_ORDER(predecessor) != order) || + (page_to_zone(pg-mask) != zone) || (phys_to_nid(page_to_maddr(predecessor)) != node) ) break; @@ -1485,6 +1486,7 @@ static void free_heap_pages( if ( !mfn_valid(page_to_mfn(successor)) || !page_state_is(successor, free) || (PFN_ORDER(successor) != order) || + (page_to_zone(pg+mask) != zone) || (phys_to_nid(page_to_maddr(successor)) != node) ) break;