[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen staging] page-alloc: fix initialization of cross-node regions



commit bd0bb8a0058b10ef6039b1a9a20ad982108d295c
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Tue Jul 26 08:33:10 2022 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Tue Jul 26 08:33:10 2022 +0200

    page-alloc: fix initialization of cross-node regions
    
    Quite obviously to determine the split condition successive pages'
    attributes need to be evaluated, not always those of the initial page.
    
    Fixes: 72b02bc75b47 ("xen/heap: pass order to free_heap_pages() in heap 
init")
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Reviewed-by: Julien Grall <jgrall@xxxxxxxxxx>
---
 xen/common/page_alloc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c
index c5c5047e7c..8bdaffeb3d 100644
--- a/xen/common/page_alloc.c
+++ b/xen/common/page_alloc.c
@@ -1885,11 +1885,11 @@ static void init_heap_pages(
              * range to cross zones.
              */
 #ifdef CONFIG_SEPARATE_XENHEAP
-            if ( zone != page_to_zone(pg) )
+            if ( zone != page_to_zone(pg + contig_pages) )
                 break;
 #endif
 
-            if ( nid != (phys_to_nid(page_to_maddr(pg))) )
+            if ( nid != (phys_to_nid(page_to_maddr(pg + contig_pages))) )
                 break;
         }
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.