xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: xen-devel@lists.xen.org
Cc: Juergen Gross <jgross@suse.com>,
	wei.liu2@citrix.com, ian.jackson@eu.citrix.com,
	glenn@rimuhosting.com
Subject: [PATCH] libxl: correct xl cpupool-numa-split with vcpu limited dom0
Date: Tue, 14 Jun 2016 06:30:58 +0200	[thread overview]
Message-ID: <1465878658-28677-1-git-send-email-jgross@suse.com> (raw)

When trying to use xl cpupool-numa-split and dom0 is limited to less
vcpus than one numa node the operation will fail.

Correct this by allowing this configuration.

Reported-by: Glenn Enright <glenn@rimuhosting.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
---
 tools/libxl/xl_cmdimpl.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index 8696ca7..d912c39 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -8537,7 +8537,11 @@ int main_cpupoolnumasplit(int argc, char **argv)
             n++;
         }
     }
-    if (libxl_set_vcpuonline(ctx, 0, &cpumap)) {
+    if (libxl_domain_info(ctx, &info, 0)) {
+        fprintf(stderr, "error on getting info for Domain-0\n");
+        goto out;
+    }
+    if (info.vcpu_online > n && libxl_set_vcpuonline(ctx, 0, &cpumap)) {
         fprintf(stderr, "error on removing vcpus for Domain-0\n");
         goto out;
     }
@@ -8552,7 +8556,7 @@ int main_cpupoolnumasplit(int argc, char **argv)
             fprintf(stderr, "error on getting info for Domain-0\n");
             goto out;
         }
-        if (info.vcpu_online == n) {
+        if (info.vcpu_online <= n) {
             break;
         }
         sleep(1);
-- 
2.6.6


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

             reply	other threads:[~2016-06-14  4:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-14  4:30 Juergen Gross [this message]
2016-06-14  9:01 ` [PATCH] libxl: correct xl cpupool-numa-split with vcpu limited dom0 Dario Faggioli
2016-06-14  9:56   ` Wei Liu
2016-06-14  9:58     ` Wei Liu
2016-06-14 10:05       ` Juergen Gross
2016-06-17 10:44         ` Wei Liu
2016-06-14 10:07     ` Ian Jackson
2016-06-14 10:31       ` Juergen Gross
2016-06-14 14:28         ` Ian Jackson

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=1465878658-28677-1-git-send-email-jgross@suse.com \
    --to=jgross@suse.com \
    --cc=glenn@rimuhosting.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=wei.liu2@citrix.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).