[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] tmem: Retire XEN_SYSCTL_TMEM_OP_[SET_CAP|SAVE_GET_CLIENT_CAP]
commit 840c5c9e6675a7ae9665fcc610b3112d1da8b672 Author: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> AuthorDate: Wed Sep 21 16:53:51 2016 -0400 Commit: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> CommitDate: Fri Sep 30 15:26:14 2016 -0400 tmem: Retire XEN_SYSCTL_TMEM_OP_[SET_CAP|SAVE_GET_CLIENT_CAP] It is not used by anything. Its intent was to complement the 'weight' attribute but there hadn't been any request for this. If there is a need to resurface it, it can be integrated back via the XEN_SYSCTL_TMEM_SET_CLIENT_INFO introduced in "tmem/libxc: Squash XEN_SYSCTL_TMEM_OP_[SET|SAVE].." Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> --- 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 -- xen/include/xen/tmem_xen.h | 1 - 8 files changed, 6 insertions(+), 36 deletions(-) diff --git a/docs/man/xl.pod.1.in b/docs/man/xl.pod.1.in index 803c67e..8e2aa5b 100644 --- a/docs/man/xl.pod.1.in +++ b/docs/man/xl.pod.1.in @@ -1589,10 +1589,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 9bf1f4c..ab44e3c 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -6156,8 +6156,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 @@ -6171,7 +6169,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 5a57342..588d5d9 100644 --- a/tools/libxl/xl_cmdtable.c +++ b/tools/libxl/xl_cmdtable.c @@ -407,7 +407,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 fd0fa67..c493f33 100644 --- a/xen/include/public/sysctl.h +++ b/xen/include/public/sysctl.h @@ -768,14 +768,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 diff --git a/xen/include/xen/tmem_xen.h b/xen/include/xen/tmem_xen.h index 582951a..86a5b24 100644 --- a/xen/include/xen/tmem_xen.h +++ b/xen/include/xen/tmem_xen.h @@ -409,7 +409,6 @@ struct client { long eph_count, eph_count_max; domid_t cli_id; uint32_t weight; - uint32_t cap; bool_t compress; bool_t frozen; bool_t shared_auth_required; -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |