From patchwork Thu Jan 5 10:08:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Roger_Pau_Monn=C3=A9?= X-Patchwork-Id: 9498803 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E89EB606DE for ; Thu, 5 Jan 2017 10:11:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E64B127F89 for ; Thu, 5 Jan 2017 10:11:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D854528334; Thu, 5 Jan 2017 10:11:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6712A27F89 for ; Thu, 5 Jan 2017 10:11:09 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cP4yP-0002cu-F7; Thu, 05 Jan 2017 10:08:41 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cP4yO-0002co-VO for xen-devel@lists.xenproject.org; Thu, 05 Jan 2017 10:08:41 +0000 Received: from [85.158.137.68] by server-7.bemta-3.messagelabs.com id E8/4C-23854-82B1E685; Thu, 05 Jan 2017 10:08:40 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpmkeJIrShJLcpLzFFi42JxWrohUlddOi/ CoH2jgcX3LZOZHBg9Dn+4whLAGMWamZeUX5HAmvHxzDKmgklcFcsPv2JqYPzH3sXIySEh4C/R PeMtmM0moCNxce5Oti5GDg4RARWJ23sNQMLMAsUSX1f1sYLYwgKREpcmbWICsVmASu7umARm8 wpYSKy8s4wFYqSexK4jv1kh4oISJ2c+YYGYoynRuv03O4QtL9G8dTYziC0koCjRP+8B2wRGnl lIWmYhaZmFpGUBI/MqRvXi1KKy1CJdM72kosz0jJLcxMwcXUMDY73c1OLixPTUnMSkYr3k/Nx NjMDAqWdgYNzBeKXN+RCjJAeTkiiv9bfcCCG+pPyUyozE4oz4otKc1OJDjDIcHEoSvMvE8iKE BItS01Mr0jJzgCEMk5bg4FES4S0HSfMWFyTmFmemQ6ROMSpKifNmgSQEQBIZpXlwbbC4ucQoK yXMy8jAwCDEU5BalJtZgir/ilGcg1FJmLdXFGgKT2ZeCdz0V0CLmYAWbw/IBllckoiQkmpgLC reOGvfn8ebiq6uvGO/o/6qV7TIns8iaxcpua2e1vq54ejPzCc6HNoO67/98gw6GZWee7Unsv5 3+Fy1eet25nJ8t1nl/ONQnF2w9ILliksmB52IF4449bjttfwM8wecu5f9vbRibuMlyf7aGYxX dgRxHsg+n5Gy6L7ZiyAv15edyt7v3NdJViqxFGckGmoxFxUnAgD4iKzylgIAAA== X-Env-Sender: prvs=171e7f3c7=roger.pau@citrix.com X-Msg-Ref: server-16.tower-31.messagelabs.com!1483610918!71497387!1 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 9.1.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 25889 invoked from network); 5 Jan 2017 10:08:39 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-16.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 5 Jan 2017 10:08:39 -0000 X-IronPort-AV: E=Sophos;i="5.33,320,1477958400"; d="scan'208";a="398076256" From: Roger Pau Monne To: Date: Thu, 5 Jan 2017 10:08:34 +0000 Message-ID: <20170105100834.5520-1-roger.pau@citrix.com> X-Mailer: git-send-email 2.10.1 (Apple Git-78) MIME-Version: 1.0 Cc: Wei Liu , Ian Jackson , Roger Pau Monne Subject: [Xen-devel] [PATCH v2] tools/libxl: include scheduler parameters in the output of xl list -l X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Roger Pau Monné Reported-by: Fatih Acar Acked-by: Wei Liu --- Cc: Ian Jackson Cc: Wei Liu --- This should be backported to all supported stable branches (4.6, 4.7, 4.8). --- Changes since v1: - Move fetching the scheduler parameters before device configuration. - Call libxl_domain_sched_params_dispose before fetching the parameters. --- tools/libxl/libxl.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index 6fd4fe1..c5d67c1 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -6844,6 +6844,17 @@ int libxl_retrieve_domain_configuration(libxl_ctx *ctx, uint32_t domid, d_config->b_info.max_memkb = max_memkb; } + /* Scheduler params */ + { + libxl_domain_sched_params_dispose(&d_config->b_info.sched_params); + rc = libxl_domain_sched_params_get(ctx, domid, + &d_config->b_info.sched_params); + if (rc) { + LOGD(ERROR, domid, "Fail to get scheduler parameters"); + goto out; + } + } + /* Devices: disk, nic, vtpm, pcidev etc. */ /* The MERGE macro implements following logic: