From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: [PATCH] libxl: bail from placement on non-NUMA boxes Date: Wed, 30 Apr 2014 17:44:13 +0200 Message-ID: <20140430154408.15909.6835.stgit@Solace> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel Cc: Juergen Gross , Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org 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 --- 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 4fac664..94ca4fe 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); /*