All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juergen Gross <juergen.gross@ts.fujitsu.com>
To: George Dunlap <George.Dunlap@eu.citrix.com>
Cc: xen-devel@lists.xensource.com
Subject: Re: [PATCH] xl cpupool-numa-split: reduce number of Dom0 vcpus
Date: Mon, 14 Feb 2011 14:13:19 +0100	[thread overview]
Message-ID: <4D592A6F.9040700@ts.fujitsu.com> (raw)
In-Reply-To: <AANLkTinTmULFdrvgo9P7d+1sejt6-5cQqd_b=vib7Cw=@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 505 bytes --]

On 02/14/11 13:36, George Dunlap wrote:
> Is looping 10 times really the best option?

Oops! Forgot the sleep(1) :-(

What about this one?

-- 
Juergen Gross                 Principal Developer Operating Systems
TSP ES&S SWE OS6                       Telephone: +49 (0) 89 3222 2967
Fujitsu Technology Solutions              e-mail: juergen.gross@ts.fujitsu.com
Domagkstr. 28                           Internet: ts.fujitsu.com
D-80807 Muenchen                 Company details: ts.fujitsu.com/imprint.html

[-- Attachment #2: xen-work.patch --]
[-- Type: text/x-patch, Size: 1830 bytes --]

# HG changeset patch
# User Juergen Gross <juergen.gross@ts.fujitsu.com>
# Date 1297680409 -3600
# Node ID fdcb4e8eb4bb02f2c14b5333b9839dbd7b8786df
# Parent  f3579aa973c24a4ecee809a184b08c1855cd07ba
xl cpupool-numa-split: reduce number of Dom0 vcpus

When reducing the number of physical cpus available for Domain-0 by xl
cpupool-numa-split, reduce the number of vcpus accordingly.

Signed-off-by: juergen.gross@ts.fujitsu.com

diff -r f3579aa973c2 -r fdcb4e8eb4bb tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c	Mon Feb 14 11:02:50 2011 +0100
+++ b/tools/libxl/xl_cmdimpl.c	Mon Feb 14 11:46:49 2011 +0100
@@ -5762,6 +5762,7 @@ int main_cpupoolnumasplit(int argc, char
     libxl_cpumap cpumap;
     libxl_cpupoolinfo *poolinfo;
     libxl_topologyinfo topology;
+    libxl_dominfo info;
 
     while ((opt = getopt(argc, argv, "h")) != -1) {
         switch (opt) {
@@ -5817,11 +5818,28 @@ int main_cpupoolnumasplit(int argc, char
         goto out;
     }
 
+    n = 0;
     for (c = 0; c < topology.nodemap.entries; c++) {
         if (topology.nodemap.array[c] == node) {
             topology.nodemap.array[c] = LIBXL_CPUARRAY_INVALID_ENTRY;
-        }
-    }
+            libxl_cpumap_set(&cpumap, n);
+            n++;
+        }
+    }
+    if (libxl_set_vcpuonline(&ctx, 0, &cpumap)) {
+        fprintf(stderr, "error on removing vcpus for Domain-0\n");
+        goto out;
+    }
+    for (c = 0; c < 10; c++) {
+        if (libxl_domain_info(&ctx, &info, 0)) {
+            fprintf(stderr, "error on getting info for Domain-0\n");
+            goto out;
+        }
+        if (info.vcpu_online == n) {
+            break;
+        }
+    }
+    memset(cpumap.map, 0, cpumap.size);
 
     for (c = 0; c < topology.nodemap.entries; c++) {
         if (topology.nodemap.array[c] == LIBXL_CPUARRAY_INVALID_ENTRY) {

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

  reply	other threads:[~2011-02-14 13:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-14 10:47 [PATCH] xl cpupool-numa-split: reduce number of Dom0 vcpus Juergen Gross
2011-02-14 12:36 ` George Dunlap
2011-02-14 13:13   ` Juergen Gross [this message]
2011-02-14 15:45     ` Ian Jackson
2011-02-15  6:02       ` Juergen Gross
2011-02-15 19:27         ` Ian Jackson
2011-02-16  8:40           ` Juergen Gross
2011-02-17 19:39         ` 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=4D592A6F.9040700@ts.fujitsu.com \
    --to=juergen.gross@ts.fujitsu.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /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.