From: Dario Faggioli Subject: [PATCH 2/2] libxl: unset info->numa_placement upon successful placement Date: Wed, 01 Jul 2015 16:03:14 +0200 Message-ID: <20150701140314.15951.74412.stgit@Solace.station> References: <20150701135059.15951.39938.stgit@Solace.station> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZAIbf-00070v-G1 for xen-devel@lists.xenproject.org; Wed, 01 Jul 2015 14:03:19 +0000 Received: by wiwl6 with SMTP id l6so166355414wiw.0 for ; Wed, 01 Jul 2015 07:03:17 -0700 (PDT) In-Reply-To: <20150701135059.15951.39938.stgit@Solace.station> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Euan Harris , Ian Campbell , Wei Liu , Ian Jackson , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org 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 --- Cc: Ian Jackson Cc: Stefano Stabellini Cc: Ian Campbell Cc: Wei Liu Cc: Euan Harris --- 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); } }