xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Dario Faggioli <dario.faggioli@citrix.com>
To: xen-devel@lists.xenproject.org
Cc: Euan Harris <euan.harris@citrix.com>,
	Ian Campbell <ian.campbell@citrix.com>,
	Wei Liu <wei.liu2@citrix.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: [PATCH 2/2] libxl: unset info->numa_placement upon successful placement
Date: Wed, 01 Jul 2015 16:03:14 +0200	[thread overview]
Message-ID: <20150701140314.15951.74412.stgit@Solace.station> (raw)
In-Reply-To: <20150701135059.15951.39938.stgit@Solace.station>

so that, if the same config is reused later, the following
two (good) things happen:
 - we do not trip over warnings because node and/or vcpu
   soft affinity now exist (as a consequence of the
   successful placement), but numa_placement is still
   true;
 - we end up always using the results of the original
   execution of the placement algorithm, rather than
   re-running it at each re-use of the same config,
   which is what most users expects and wants.

This fixes the bug reported here:
http://lists.xenproject.org/archives/html/xen-devel/2015-06/msg04454.html

Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
---
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
Cc: Euan Harris <euan.harris@citrix.com>
---
 tools/libxl/libxl_dom.c |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c
index b9a77a5..8642192 100644
--- a/tools/libxl/libxl_dom.c
+++ b/tools/libxl/libxl_dom.c
@@ -369,6 +369,15 @@ int libxl__build_pre(libxl__gc *gc, uint32_t domid,
                                        NULL, &cpumap_soft);
 
             libxl_bitmap_dispose(&cpumap_soft);
+
+            /*
+             * Placement has run, so avoid for it to be re-run, if this
+             * same config we are using and building here is ever re-used.
+             * This means that people re-using configs will get the same
+             * results, consistently, across every re-use, which is what
+             * we expect most people to want.
+             */
+            libxl_defbool_set(&info->numa_placement, false);
         }
     }

  parent reply	other threads:[~2015-07-01 14:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-01 14:02 [PATCH 0/2] libxl: fix NUMA placement preventing domain config to be re-used Dario Faggioli
2015-07-01 14:03 ` [PATCH 1/2] libxl: turn NUMA placement misconfigs into warnings Dario Faggioli
2015-07-01 14:38   ` Ian Jackson
2015-07-03 10:35     ` Ian Campbell
2015-07-03 11:09       ` Ian Jackson
2015-07-03 14:52         ` Dario Faggioli
2015-07-01 14:03 ` Dario Faggioli [this message]
2015-07-01 14:39   ` [PATCH 2/2] libxl: unset info->numa_placement upon successful placement 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=20150701140314.15951.74412.stgit@Solace.station \
    --to=dario.faggioli@citrix.com \
    --cc=euan.harris@citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.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).