All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dario Faggioli <dario.faggioli@citrix.com>
To: xen-devel <xen-devel@lists.xen.org>
Cc: Juergen Gross <juergen.gross@ts.fujitsu.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>,
	Ian Campbell <Ian.Campbell@citrix.com>
Subject: [PATCH] libxl: bail from placement on non-NUMA boxes
Date: Wed, 30 Apr 2014 17:44:13 +0200	[thread overview]
Message-ID: <20140430154408.15909.6835.stgit@Solace> (raw)

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 <dario.faggioli@citrix.com>
---
 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);
 
     /*

             reply	other threads:[~2014-04-30 15:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-30 15:44 Dario Faggioli [this message]
2014-05-02 13:03 ` [PATCH] libxl: bail from placement on non-NUMA boxes Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140430154408.15909.6835.stgit@Solace \
    --to=dario.faggioli@citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=juergen.gross@ts.fujitsu.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.