From 7a7776a916a4d117c72ecf417a623fa20a505b90 Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Wed, 30 Apr 2014 17:44:13 +0200 Subject: [PATCH] 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. Signed-off-by: Dario Faggioli Acked-by: Ian Campbell --- tools/libxl/libxl_numa.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/libxl/libxl_numa.c b/tools/libxl/libxl_numa.c index 4fac6641c6..94ca4fec46 100644 --- a/tools/libxl/libxl_numa.c +++ b/tools/libxl/libxl_numa.c @@ -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); /* -- 2.30.2