Skip to contentSkip to conversation

libxl: bail from placement on non-NUMA boxes

PATCH In review Dario Faggioli 2 participants 2 messages Apr 30, 2014 – May 2, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libxl: bail from placement on non-NUMA boxes

If there only is 1 NUMA node, no need to go through placement candidate selection, etc., we can just bail.

---
 tools/libxl/libxl_numa.c |    5 +++++
 1 file changed, 5 insertions(+)
tools/libxl/libxl_numa.c +5 -0
index 4fac664..94ca4fe 100644
@@ -308,6 +308,11 @@ int libxl__get_numa_candidate(libxl__gc *gc,
     if (ninfo == NULL)
         return ERROR_FAIL;
 
+    if (nr_nodes <= 1) {
+        *cndt_found = 0;
+        goto out;
+    }
+
     GCNEW_ARRAY(vcpus_on_node, nr_nodes);
 
     /*
#1 lore raw
Quoted 4 lines · Dario Faggioli

If there only is 1 NUMA node, no need to go through placement candidate selection, etc., we can just bail.

Acked + applied.

Quoted 21 lines
---
 tools/libxl/libxl_numa.c |    5 +++++
 1 file changed, 5 insertions(+)
tools/libxl/libxl_numa.c +5 -0
index 4fac664..94ca4fe 100644
@@ -308,6 +308,11 @@ int libxl__get_numa_candidate(libxl__gc *gc,
     if (ninfo == NULL)
         return ERROR_FAIL;
 
+    if (nr_nodes <= 1) {
+        *cndt_found = 0;
+        goto out;
+    }
+
     GCNEW_ARRAY(vcpus_on_node, nr_nodes);
 
     /*