From: Dario Faggioli <raistlin@linux.it>
To: xen-devel <xen-devel@lists.xen.org>, Dario Faggioli <raistlin@linux.it>
Cc: Andre Przywara <andre.przywara@amd.com>,
Ian Campbell <Ian.Campbell@citrix.com>,
Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>,
George Dunlap <george.dunlap@eu.citrix.com>,
Juergen Gross <juergen.gross@ts.fujitsu.com>,
Ian Jackson <Ian.Jackson@eu.citrix.com>
Subject: [PATCH 2 of 4 v6/leftover] xl: inform libxl if there was a cpumap in the config file
Date: Sat, 21 Jul 2012 03:22:22 +0200 [thread overview]
Message-ID: <ce02c3daeb7d7d8e8d26.1342833742@Solace> (raw)
In-Reply-To: <patchbomb.1342833740@Solace>
So that we attempt automatic placement only if that was not the case.
Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c
--- a/tools/libxl/libxl_create.c
+++ b/tools/libxl/libxl_create.c
@@ -215,6 +215,8 @@ int libxl__domain_build_info_setdefault(
libxl_bitmap_set_any(&b_info->cpumap);
}
+ libxl_defbool_setdefault(&b_info->numa_placement, true);
+
if (b_info->max_memkb == LIBXL_MEMKB_DEFAULT)
b_info->max_memkb = 32 * 1024;
if (b_info->target_memkb == LIBXL_MEMKB_DEFAULT)
diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c
--- a/tools/libxl/libxl_dom.c
+++ b/tools/libxl/libxl_dom.c
@@ -212,7 +212,8 @@ int libxl__build_pre(libxl__gc *gc, uint
* call to libxl_set_vcpuaffinity_all() will do the actual placement,
* whatever that turns out to be.
*/
- if (libxl_bitmap_is_full(&info->cpumap)) {
+ if (libxl_defbool_val(info->numa_placement) &&
+ libxl_bitmap_is_full(&info->cpumap)) {
int rc = numa_place_domain(gc, info);
if (rc)
return rc;
diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl
--- a/tools/libxl/libxl_types.idl
+++ b/tools/libxl/libxl_types.idl
@@ -249,6 +249,7 @@ libxl_domain_build_info = Struct("domain
("max_vcpus", integer),
("avail_vcpus", libxl_bitmap),
("cpumap", libxl_bitmap),
+ ("numa_placement", libxl_defbool),
("tsc_mode", libxl_tsc_mode),
("max_memkb", MemKB),
("target_memkb", MemKB),
diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -696,6 +696,9 @@ static void parse_config_data(const char
vcpu_to_pcpu[n_cpus] = i;
n_cpus++;
}
+
+ /* We have a cpumap, disable automatic placement */
+ libxl_defbool_set(&b_info->numa_placement, false);
}
else if (!xlu_cfg_get_string (config, "cpus", &buf, 0)) {
char *buf2 = strdup(buf);
@@ -709,6 +712,8 @@ static void parse_config_data(const char
if (vcpupin_parse(buf2, &b_info->cpumap))
exit(1);
free(buf2);
+
+ libxl_defbool_set(&b_info->numa_placement, false);
}
if (!xlu_cfg_get_long (config, "memory", &l, 0)) {
next prev parent reply other threads:[~2012-07-21 1:22 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-21 1:22 [PATCH 0 of 4 v6/leftover] Automatic NUMA placement for xl Dario Faggioli
2012-07-21 1:22 ` [PATCH 1 of 4 v6/leftover] libxl: enable automatic placement of guests on NUMA nodes Dario Faggioli
2012-07-23 11:38 ` Ian Jackson
2012-07-23 14:39 ` Dario Faggioli
2012-07-23 15:50 ` Ian Jackson
2012-07-23 16:16 ` Dario Faggioli
2012-07-21 1:22 ` Dario Faggioli [this message]
2012-07-23 11:04 ` [PATCH 2 of 4 v6/leftover] xl: inform libxl if there was a cpumap in the config file Ian Jackson
2012-07-23 13:35 ` Dario Faggioli
2012-07-21 1:22 ` [PATCH 3 of 4 v6/leftover] libxl: have NUMA placement deal with cpupools Dario Faggioli
2012-07-23 11:38 ` Ian Jackson
2012-07-23 13:21 ` Dario Faggioli
2012-07-21 1:22 ` [PATCH 4 of 4 v6/leftover] Some automatic NUMA placement documentation Dario Faggioli
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=ce02c3daeb7d7d8e8d26.1342833742@Solace \
--to=raistlin@linux.it \
--cc=Ian.Campbell@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=Stefano.Stabellini@eu.citrix.com \
--cc=andre.przywara@amd.com \
--cc=george.dunlap@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.