From patchwork Wed Sep 28 09:42:16 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Rzeszutek Wilk X-Patchwork-Id: 9353659 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 3C7396077A for ; Wed, 28 Sep 2016 09:44:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 28AE82947F for ; Wed, 28 Sep 2016 09:44:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1C14629482; Wed, 28 Sep 2016 09:44:50 +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, UNPARSEABLE_RELAY 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 4135B29478 for ; Wed, 28 Sep 2016 09:44:48 +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 1bpBO5-00009H-5M; Wed, 28 Sep 2016 09:42:49 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bpBO3-00007a-Mr for xen-devel@lists.xenproject.org; Wed, 28 Sep 2016 09:42:47 +0000 Received: from [85.158.139.211] by server-3.bemta-5.messagelabs.com id 29/AA-01957-7909BE75; Wed, 28 Sep 2016 09:42:47 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrNLMWRWlGSWpSXmKPExsXSO6nOVXfKhNf hBoeapC2+b5nM5MDocfjDFZYAxijWzLyk/IoE1oz5XW2sBavsK+Z9u8rUwLjDsIuRi0NIYDKT xIalTUwQzjdGiSnPO6GcjYwSB7e1sUM4ExglbizqZuti5OBgEzCReLPKsYuRk0NEwFRi+8STL CA1zALTGCU+nTrCBJIQFgiXeHfuGCuIzSKgKnHu4C12EJtXwE1i38NWVpA5EgLyEs9u14OYnA LuEvcP+4JUCAFVfG94zAJiSwgYS7S/vcg2gZFvASPDKkaN4tSistQiXSNjvaSizPSMktzEzBx dQwNTvdzU4uLE9NScxKRiveT83E2MwECpZ2Bg3MG4o93vEKMkB5OSKO/m8NfhQnxJ+SmVGYnF GfFFpTmpxYcYZTg4lCR4D/YB5QSLUtNTK9Iyc4AhC5OW4OBREuHNAUnzFhck5hZnpkOkTjEqS onzHgdJCIAkMkrz4NpgcXKJUVZKmJeRgYFBiKcgtSg3swRV/hWjOAejkjCvVj/QFJ7MvBK46a +AFjMBLV564gXI4pJEhJRUA2PDhBL5fst/r74nqG16k5/R8LJOyLXZkvtH+82M5uurRc2nzFj iLVWbtmSidMZKEfW4p6vY4+8UeCjzPtK5VJ0Yn35xi/PTPhOFkHoD+8ATf+p5Pqd/u168/eHD O3l+h6c7Spk6x9oeOL+87W5gnaB5zsdtzaax8oqOlp1ye7l3HFvGmne7VImlOCPRUIu5qDgRA MxA5D+OAgAA X-Env-Sender: konrad.wilk@oracle.com X-Msg-Ref: server-9.tower-206.messagelabs.com!1475055762!62049638!1 X-Originating-IP: [141.146.126.69] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogMTQxLjE0Ni4xMjYuNjkgPT4gMjc3MjE4\n X-StarScan-Received: X-StarScan-Version: 8.84; banners=-,-,- X-VirusChecked: Checked Received: (qmail 6175 invoked from network); 28 Sep 2016 09:42:44 -0000 Received: from aserp1040.oracle.com (HELO aserp1040.oracle.com) (141.146.126.69) by server-9.tower-206.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 28 Sep 2016 09:42:44 -0000 Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u8S9gbNC028656 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 28 Sep 2016 09:42:37 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id u8S9gbd7002474 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 28 Sep 2016 09:42:37 GMT Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id u8S9gY8e019367; Wed, 28 Sep 2016 09:42:35 GMT Received: from localhost.localdomain.com (/209.6.196.81) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 28 Sep 2016 02:42:34 -0700 From: Konrad Rzeszutek Wilk To: xen-devel@lists.xenproject.org, konrad@kernel.org Date: Wed, 28 Sep 2016 05:42:16 -0400 Message-Id: <1475055746-22401-3-git-send-email-konrad.wilk@oracle.com> X-Mailer: git-send-email 2.4.11 In-Reply-To: <1475055746-22401-1-git-send-email-konrad.wilk@oracle.com> References: <1475055746-22401-1-git-send-email-konrad.wilk@oracle.com> X-Source-IP: aserv0022.oracle.com [141.146.126.234] Cc: Wei Liu , Ian Jackson , Konrad Rzeszutek Wilk Subject: [Xen-devel] [PATCH v1 02/12] tmem: Retire XEN_SYSCTL_TMEM_OP_[SET_CAP|SAVE_GET_CLIENT_CAP] 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: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP It is not used by anything. Signed-off-by: Konrad Rzeszutek Wilk Acked-by: Wei Liu --- Cc: Ian Jackson Cc: Wei Liu v1: First submission --- docs/man/xl.pod.1.in | 4 ---- tools/libxc/xc_tmem.c | 13 +++---------- tools/libxl/libxl.c | 4 +--- tools/libxl/xl_cmdtable.c | 1 - tools/python/xen/lowlevel/xc/xc.c | 1 - xen/common/tmem_control.c | 16 ++-------------- xen/include/public/sysctl.h | 2 -- 7 files changed, 6 insertions(+), 35 deletions(-) diff --git a/docs/man/xl.pod.1.in b/docs/man/xl.pod.1.in index a2be541..9b44f25 100644 --- a/docs/man/xl.pod.1.in +++ b/docs/man/xl.pod.1.in @@ -1580,10 +1580,6 @@ B Weight (int) -=item B<-c> I - -Cap (int) - =item B<-p> I Compress (int) diff --git a/tools/libxc/xc_tmem.c b/tools/libxc/xc_tmem.c index 31ae3f5..24c8b43 100644 --- a/tools/libxc/xc_tmem.c +++ b/tools/libxc/xc_tmem.c @@ -212,7 +212,7 @@ int xc_tmem_save(xc_interface *xch, int marker = field_marker; int i, j; uint32_t max_pools, version; - uint32_t weight, cap, flags; + uint32_t weight, flags; uint32_t pool_id; uint32_t minusone = -1; struct tmem_handle *h; @@ -238,10 +238,7 @@ int xc_tmem_save(xc_interface *xch, weight = xc_tmem_control(xch,0,XEN_SYSCTL_TMEM_OP_SAVE_GET_CLIENT_WEIGHT,dom,0,0,NULL); if ( write_exact(io_fd, &weight, sizeof(weight)) ) return -1; - cap = xc_tmem_control(xch,0,XEN_SYSCTL_TMEM_OP_SAVE_GET_CLIENT_CAP,dom,0,0,NULL); - if ( write_exact(io_fd, &cap, sizeof(cap)) ) - return -1; - if ( flags == -1 || weight == -1 || cap == -1 ) + if ( flags == -1 || weight == -1 ) return -1; if ( write_exact(io_fd, &minusone, sizeof(minusone)) ) return -1; @@ -384,7 +381,7 @@ int xc_tmem_restore(xc_interface *xch, int dom, int io_fd) uint32_t this_max_pools, this_version; uint32_t pool_id; uint32_t minusone; - uint32_t weight, cap, flags; + uint32_t weight, flags; int checksum = 0; if ( read_exact(io_fd, &this_version, sizeof(this_version)) ) @@ -410,10 +407,6 @@ int xc_tmem_restore(xc_interface *xch, int dom, int io_fd) return -1; if ( xc_tmem_control(xch,0,XEN_SYSCTL_TMEM_OP_SET_WEIGHT,dom,0,0,NULL) < 0 ) return -1; - if ( read_exact(io_fd, &cap, sizeof(cap)) ) - return -1; - if ( xc_tmem_control(xch,0,XEN_SYSCTL_TMEM_OP_SET_CAP,dom,0,0,NULL) < 0 ) - return -1; if ( read_exact(io_fd, &minusone, sizeof(minusone)) ) return -1; while ( read_exact(io_fd, &pool_id, sizeof(pool_id)) == 0 && pool_id != -1 ) diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index 997d94c..e3ee49c 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -6065,8 +6065,6 @@ static int32_t tmem_setop_from_string(char *set_name) { if (!strcmp(set_name, "weight")) return XEN_SYSCTL_TMEM_OP_SET_WEIGHT; - else if (!strcmp(set_name, "cap")) - return XEN_SYSCTL_TMEM_OP_SET_CAP; else if (!strcmp(set_name, "compress")) return XEN_SYSCTL_TMEM_OP_SET_COMPRESS; else @@ -6080,7 +6078,7 @@ int libxl_tmem_set(libxl_ctx *ctx, uint32_t domid, char* name, uint32_t set) GC_INIT(ctx); if (subop == -1) { - LOGEV(ERROR, -1, "Invalid set, valid sets are "); + LOGEV(ERROR, -1, "Invalid set, valid sets are "); rc = ERROR_INVAL; goto out; } diff --git a/tools/libxl/xl_cmdtable.c b/tools/libxl/xl_cmdtable.c index 78786fe..368bfeb 100644 --- a/tools/libxl/xl_cmdtable.c +++ b/tools/libxl/xl_cmdtable.c @@ -405,7 +405,6 @@ struct cmd_spec cmd_table[] = { "[|-a] [-w[=WEIGHT]|-c[=CAP]|-p[=COMPRESS]]", " -a Operate on all tmem\n" " -w WEIGHT Weight (int)\n" - " -c CAP Cap (int)\n" " -p COMPRESS Compress (int)", }, { "tmem-shared-auth", diff --git a/tools/python/xen/lowlevel/xc/xc.c b/tools/python/xen/lowlevel/xc/xc.c index 8411789..287f590 100644 --- a/tools/python/xen/lowlevel/xc/xc.c +++ b/tools/python/xen/lowlevel/xc/xc.c @@ -1641,7 +1641,6 @@ static PyObject *pyxc_tmem_control(XcObject *self, case XEN_SYSCTL_TMEM_OP_FREEZE: case XEN_SYSCTL_TMEM_OP_DESTROY: case XEN_SYSCTL_TMEM_OP_SET_WEIGHT: - case XEN_SYSCTL_TMEM_OP_SET_CAP: case XEN_SYSCTL_TMEM_OP_SET_COMPRESS: default: break; diff --git a/xen/common/tmem_control.c b/xen/common/tmem_control.c index 81a2414..ca34852 100644 --- a/xen/common/tmem_control.c +++ b/xen/common/tmem_control.c @@ -103,9 +103,9 @@ static int tmemc_list_client(struct client *c, tmem_cli_va_param_t buf, struct tmem_pool *p; bool_t s; - n = scnprintf(info,BSIZE,"C=CI:%d,ww:%d,ca:%d,co:%d,fr:%d," + n = scnprintf(info,BSIZE,"C=CI:%d,ww:%d,co:%d,fr:%d," "Tc:%"PRIu64",Ge:%ld,Pp:%ld,Gp:%ld%c", - c->cli_id, c->weight, c->cap, c->compress, c->frozen, + c->cli_id, c->weight, c->compress, c->frozen, c->total_cycles, c->succ_eph_gets, c->succ_pers_puts, c->succ_pers_gets, use_long ? ',' : '\n'); if (use_long) @@ -273,11 +273,6 @@ static int __tmemc_set_var(struct client *client, uint32_t subop, uint32_t arg1) atomic_sub(old_weight,&tmem_global.client_weight_total); atomic_add(client->weight,&tmem_global.client_weight_total); break; - case XEN_SYSCTL_TMEM_OP_SET_CAP: - client->cap = arg1; - tmem_client_info("tmem: cap set to %d for %s=%d\n", - arg1, tmem_cli_id_str, cli_id); - break; case XEN_SYSCTL_TMEM_OP_SET_COMPRESS: if ( tmem_dedup_enabled() ) { @@ -341,11 +336,6 @@ static int tmemc_save_subop(int cli_id, uint32_t pool_id, break; rc = client->weight == -1 ? -2 : client->weight; break; - case XEN_SYSCTL_TMEM_OP_SAVE_GET_CLIENT_CAP: - if ( client == NULL ) - break; - rc = client->cap == -1 ? -2 : client->cap; - break; case XEN_SYSCTL_TMEM_OP_SAVE_GET_CLIENT_FLAGS: if ( client == NULL ) break; @@ -404,7 +394,6 @@ int tmem_control(struct xen_sysctl_tmem_op *op) guest_handle_cast(op->buf, char), op->arg1, op->arg2); break; case XEN_SYSCTL_TMEM_OP_SET_WEIGHT: - case XEN_SYSCTL_TMEM_OP_SET_CAP: case XEN_SYSCTL_TMEM_OP_SET_COMPRESS: ret = tmemc_set_var(op->cli_id, cmd, op->arg1); break; @@ -414,7 +403,6 @@ int tmem_control(struct xen_sysctl_tmem_op *op) case XEN_SYSCTL_TMEM_OP_SAVE_GET_VERSION: case XEN_SYSCTL_TMEM_OP_SAVE_GET_MAXPOOLS: case XEN_SYSCTL_TMEM_OP_SAVE_GET_CLIENT_WEIGHT: - case XEN_SYSCTL_TMEM_OP_SAVE_GET_CLIENT_CAP: case XEN_SYSCTL_TMEM_OP_SAVE_GET_CLIENT_FLAGS: case XEN_SYSCTL_TMEM_OP_SAVE_GET_POOL_FLAGS: case XEN_SYSCTL_TMEM_OP_SAVE_GET_POOL_NPAGES: diff --git a/xen/include/public/sysctl.h b/xen/include/public/sysctl.h index 8197c14..847ec35 100644 --- a/xen/include/public/sysctl.h +++ b/xen/include/public/sysctl.h @@ -757,14 +757,12 @@ DEFINE_XEN_GUEST_HANDLE(xen_sysctl_psr_cat_op_t); #define XEN_SYSCTL_TMEM_OP_DESTROY 3 #define XEN_SYSCTL_TMEM_OP_LIST 4 #define XEN_SYSCTL_TMEM_OP_SET_WEIGHT 5 -#define XEN_SYSCTL_TMEM_OP_SET_CAP 6 #define XEN_SYSCTL_TMEM_OP_SET_COMPRESS 7 #define XEN_SYSCTL_TMEM_OP_QUERY_FREEABLE_MB 8 #define XEN_SYSCTL_TMEM_OP_SAVE_BEGIN 10 #define XEN_SYSCTL_TMEM_OP_SAVE_GET_VERSION 11 #define XEN_SYSCTL_TMEM_OP_SAVE_GET_MAXPOOLS 12 #define XEN_SYSCTL_TMEM_OP_SAVE_GET_CLIENT_WEIGHT 13 -#define XEN_SYSCTL_TMEM_OP_SAVE_GET_CLIENT_CAP 14 #define XEN_SYSCTL_TMEM_OP_SAVE_GET_CLIENT_FLAGS 15 #define XEN_SYSCTL_TMEM_OP_SAVE_GET_POOL_FLAGS 16 #define XEN_SYSCTL_TMEM_OP_SAVE_GET_POOL_NPAGES 17