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

[Xen-devel] [PATCH 4/3] nodemask: Don't opencode cycle_node()



No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
CC: Jan Beulich <JBeulich@xxxxxxxx>
CC: Wei Liu <wl@xxxxxxx>
CC: Roger Pau Monné <roger.pau@xxxxxxxxxx>
CC: Stefano Stabellini <sstabellini@xxxxxxxxxx>
CC: Julien Grall <julien.grall@xxxxxxx>
CC: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
---
 xen/arch/x86/numa.c     | 4 +---
 xen/common/page_alloc.c | 7 ++-----
 2 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/xen/arch/x86/numa.c b/xen/arch/x86/numa.c
index c36c69e842..f7d320f207 100644
--- a/xen/arch/x86/numa.c
+++ b/xen/arch/x86/numa.c
@@ -192,9 +192,7 @@ void __init numa_init_array(void)
         if ( cpu_to_node[i] != NUMA_NO_NODE )
             continue;
         numa_set_node(i, rr);
-        rr = next_node(rr, &node_online_map);
-        if ( rr == MAX_NUMNODES )
-            rr = first_node(&node_online_map);
+        rr = cycle_node(rr, &node_online_map);
     }
 }
 
diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c
index fe1159b352..8858766c97 100644
--- a/xen/common/page_alloc.c
+++ b/xen/common/page_alloc.c
@@ -823,11 +823,8 @@ static struct page_info *get_free_buddy(unsigned int 
zone_lo,
     if ( node == NUMA_NO_NODE )
     {
         if ( d != NULL )
-        {
-            node = next_node(d->last_alloc_node, &nodemask);
-            if ( node >= MAX_NUMNODES )
-                node = first_node(&nodemask);
-        }
+            node = cycle_node(d->last_alloc_node, &nodemask);
+
         if ( node >= MAX_NUMNODES )
             node = cpu_to_node(smp_processor_id());
     }
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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