From patchwork Mon Feb 22 21:02:12 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joao Martins X-Patchwork-Id: 8383311 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 1DFCD9F1D4 for ; Mon, 22 Feb 2016 21:05:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 45010205CA for ; Mon, 22 Feb 2016 21:05:35 +0000 (UTC) Received: from lists.xen.org (lists.xenproject.org [50.57.142.19]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5C3E3205CD for ; Mon, 22 Feb 2016 21:05:34 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aXxdS-0001LJ-9S; Mon, 22 Feb 2016 21:03:14 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aXxdQ-0001I8-GH for xen-devel@lists.xen.org; Mon, 22 Feb 2016 21:03:12 +0000 Received: from [85.158.139.211] by server-16.bemta-5.messagelabs.com id 12/75-02988-F877BC65; Mon, 22 Feb 2016 21:03:11 +0000 X-Env-Sender: joao.m.martins@oracle.com X-Msg-Ref: server-16.tower-206.messagelabs.com!1456174989!9749650!1 X-Originating-IP: [156.151.31.81] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogMTU2LjE1MS4zMS44MSA9PiAyODgzMzk=\n X-StarScan-Received: X-StarScan-Version: 7.35.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 12037 invoked from network); 22 Feb 2016 21:03:10 -0000 Received: from userp1040.oracle.com (HELO userp1040.oracle.com) (156.151.31.81) by server-16.tower-206.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 22 Feb 2016 21:03:10 -0000 Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u1ML32gc004969 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 22 Feb 2016 21:03:03 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0021.oracle.com (8.13.8/8.13.8) with ESMTP id u1ML32rk003279 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Mon, 22 Feb 2016 21:03:02 GMT Received: from abhmp0009.oracle.com (abhmp0009.oracle.com [141.146.116.15]) by aserv0122.oracle.com (8.13.8/8.13.8) with ESMTP id u1ML2uKQ001998; Mon, 22 Feb 2016 21:03:02 GMT Received: from localhost.localdomain (/89.181.88.39) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 22 Feb 2016 13:02:51 -0800 From: Joao Martins To: xen-devel@lists.xen.org Date: Mon, 22 Feb 2016 21:02:12 +0000 Message-Id: <1456174934-22973-7-git-send-email-joao.m.martins@oracle.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1456174934-22973-1-git-send-email-joao.m.martins@oracle.com> References: <1456174934-22973-1-git-send-email-joao.m.martins@oracle.com> X-Source-IP: userv0021.oracle.com [156.151.31.71] Cc: Wei Liu , Joao Martins , Ian Jackson , Ian Campbell , Stefano Stabellini Subject: [Xen-devel] [PATCH RFC 6/8] xl: introduce smt option X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This options changes how "vcpus" are seen by dividing them in the number of SMT threads supported by the host. This should be used together with "cpus" so that the topology matches. Signed-off-by: Joao Martins --- CC: Ian Jackson CC: Stefano Stabellini CC: Ian Campbell CC: Wei Liu --- docs/man/xl.cfg.pod.5 | 6 ++++++ tools/libxl/xl_cmdimpl.c | 2 ++ 2 files changed, 8 insertions(+) diff --git a/docs/man/xl.cfg.pod.5 b/docs/man/xl.cfg.pod.5 index 40690bd..5e614f7 100644 --- a/docs/man/xl.cfg.pod.5 +++ b/docs/man/xl.cfg.pod.5 @@ -104,6 +104,12 @@ Put the guest's vcpus into the named cpu pool. Start the guest with N vcpus initially online. +=item B + +Configures if guests should see SMT topology instead of normal flat topology. + +Default is C<0> + =item B Allow the guest to bring up a maximum of M vcpus. At start of day if diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index d07ccb2..c09f628 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -1365,6 +1365,8 @@ static void parse_config_data(const char *config_source, libxl_bitmap_set((&b_info->avail_vcpus), l); } + xlu_cfg_get_defbool(config, "smt", &b_info->smt, 0); + if (!xlu_cfg_get_long (config, "maxvcpus", &l, 0)) b_info->max_vcpus = l;