[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH v1 02/12] tmem: Retire XEN_SYSCTL_TMEM_OP_[SET_CAP|SAVE_GET_CLIENT_CAP]



It is not used by anything.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
---
Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Cc:  Wei Liu <wei.liu2@xxxxxxxxxx>

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<OPTIONS>
 
 Weight (int)
 
-=item B<-c> I<CAP>
-
-Cap (int)
-
 =item B<-p> I<COMPRESS>
 
 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 <weight|cap|compress>");
+        LOGEV(ERROR, -1, "Invalid set, valid sets are <weight|compress>");
         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[] = {
       "[<Domain>|-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
-- 
2.4.11


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.