xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad@kernel.org>
To: Jan Beulich <JBeulich@suse.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>,
	Wei Liu <wei.liu2@citrix.com>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH v1 02/12] tmem: Retire XEN_SYSCTL_TMEM_OP_[SET_CAP|SAVE_GET_CLIENT_CAP]
Date: Fri, 30 Sep 2016 10:04:55 -0400	[thread overview]
Message-ID: <20160930140455.GA2064@localhost.localdomain> (raw)
In-Reply-To: <57EBCF7202000078001134BB@prv-mh.provo.novell.com>

On Wed, Sep 28, 2016 at 06:10:58AM -0600, Jan Beulich wrote:
> >>> On 28.09.16 at 11:42, <konrad.wilk@oracle.com> wrote:
> > It is not used by anything.
> 
> But that shouldn't be the only aspect. Are they also not useful for
> anything?

As far as I can see it was meant to complement the 'weight'. But the
code just hangs around. I can re-introduce it if there is a need for it
and make it visible via the  XEN_SYSCTL_TMEM_SET_CLIENT_INFO (introduced
in patch #7).

> 
> > --- 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;
> 
> It looks like you're removing all accesses to the cap field. That would
> suggest that you now want to also remove the field itself.

Yes! The patch titled "06/12] tmem: Move client
weight,frozen,live_migrating, and compress" did it, but it should have
been done here. Thanks!
> 
> > --- 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
> 
> I think such removals should be accompanied by bumping
> XEN_SYSCTL_INTERFACE_VERSION, albeit it's obviously not as
> relevant as it would be when changing some structure's layout.

The patch series actually does not alter the layout per say. I think
it would be most justified in "11/12] tmem/xc_tmem_control: Rename
'arg1' to 'len' and 'arg2' to arg." as that:

"Of all the various sub-commands, the only one that needed
semantic change is XEN_SYSCTL_TMEM_OP_SAVE_BEGIN. That in the
past used 'arg1', and now we are moving it to use 'arg'."

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

  reply	other threads:[~2016-09-30 14:05 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-28  9:42 [PATCH v1] Tmem cleanups/improvements for v4.8 Konrad Rzeszutek Wilk
2016-09-28  9:42 ` [PATCH v1 01/12] libxc/tmem/restore: Remove call to XEN_SYSCTL_TMEM_OP_SAVE_GET_VERSION Konrad Rzeszutek Wilk
2016-09-28 11:00   ` Wei Liu
2016-09-28  9:42 ` [PATCH v1 02/12] tmem: Retire XEN_SYSCTL_TMEM_OP_[SET_CAP|SAVE_GET_CLIENT_CAP] Konrad Rzeszutek Wilk
2016-09-28 11:00   ` Wei Liu
2016-09-28 15:03     ` Konrad Rzeszutek Wilk
2016-09-28 12:10   ` Jan Beulich
2016-09-30 14:04     ` Konrad Rzeszutek Wilk [this message]
2016-09-28  9:42 ` [PATCH v1 03/12] tmem: Wrap tmem dedup code with CONFIG_TMEM_DEDUP Konrad Rzeszutek Wilk
2016-09-28 12:18   ` Jan Beulich
2016-09-28  9:42 ` [PATCH v1 04/12] tmem: Wrap tmem tze code with CONFIG_TMEM_TZE Konrad Rzeszutek Wilk
2016-09-28 12:19   ` Jan Beulich
2016-09-28  9:42 ` [PATCH v1 05/12] tmem: Delete deduplication (and tze) code Konrad Rzeszutek Wilk
2016-09-28 12:34   ` Jan Beulich
2016-09-28 15:05     ` Konrad Rzeszutek Wilk
2016-09-28  9:42 ` [PATCH v1 06/12] tmem: Move client weight, frozen, live_migrating, and compress Konrad Rzeszutek Wilk
2016-09-28 12:39   ` Jan Beulich
2016-09-28  9:42 ` [PATCH v1 07/12] tmem/libxc: Squash XEN_SYSCTL_TMEM_OP_[SET|SAVE] Konrad Rzeszutek Wilk
2016-09-28 11:06   ` Wei Liu
2016-09-28 12:50   ` Jan Beulich
2016-09-28  9:42 ` [PATCH v1 08/12] tmem: Handle 'struct tmem_info' as a seperate field in the Konrad Rzeszutek Wilk
2016-09-28 11:00   ` Wei Liu
2016-09-28 12:56   ` Jan Beulich
2016-09-30 14:36     ` Konrad Rzeszutek Wilk
2016-09-30 14:56       ` Jan Beulich
2016-09-30 16:51         ` Konrad Rzeszutek Wilk
2016-09-28  9:42 ` [PATCH v1 09/12] tmem: Check version and maxpools when XEN_SYSCTL_TMEM_SET_CLIENT_INFO Konrad Rzeszutek Wilk
2016-09-28 11:00   ` Wei Liu
2016-09-28 12:58   ` Jan Beulich
2016-09-28  9:42 ` [PATCH v1 10/12] tmem: Unify XEN_SYSCTL_TMEM_OP_[[SAVE_[BEGIN|END]|RESTORE_BEGIN] Konrad Rzeszutek Wilk
2016-09-28 11:06   ` Wei Liu
2016-09-28 13:00   ` Jan Beulich
2016-09-28  9:42 ` [PATCH v1 11/12] tmem/xc_tmem_control: Rename 'arg1' to 'len' and 'arg2' to arg Konrad Rzeszutek Wilk
2016-09-28 11:07   ` Wei Liu
2016-09-28  9:42 ` [PATCH v1 12/12] tmem: Batch and squash XEN_SYSCTL_TMEM_OP_SAVE_GET_POOL_[FLAGS, NPAGES, UUID] in one sub-call: XEN_SYSCTL_TMEM_OP_GET_POOLS Konrad Rzeszutek Wilk
2016-09-28 11:07   ` Wei Liu
2016-09-28 13:11   ` Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160930140455.GA2064@localhost.localdomain \
    --to=konrad@kernel.org \
    --cc=JBeulich@suse.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).