From: Chao Peng <chao.p.peng@linux.intel.com>
To: Dario Faggioli <dario.faggioli@citrix.com>
Cc: keir@xen.org, Ian.Campbell@citrix.com,
stefano.stabellini@eu.citrix.com, andrew.cooper3@citrix.com,
Ian.Jackson@eu.citrix.com, xen-devel@lists.xen.org,
will.auld@intel.com, JBeulich@suse.com, wei.liu2@citrix.com,
dgdegra@tycho.nsa.gov
Subject: Re: [PATCH v5 12/13] tools: add tools support for Intel CAT
Date: Wed, 22 Apr 2015 21:37:04 +0800 [thread overview]
Message-ID: <20150422133704.GB6566@pengc-linux.bj.intel.com> (raw)
In-Reply-To: <1429629315.18926.125.camel@citrix.com>
On Tue, Apr 21, 2015 at 05:15:15PM +0200, Dario Faggioli wrote:
> On Tue, 2015-04-21 at 17:49 +0800, Chao Peng wrote:
> > On Tue, Apr 21, 2015 at 03:24:37AM +0200, Dario Faggioli wrote:
> > > On Fri, 2015-04-17 at 22:33 +0800, Chao Peng wrote:
> > > > This is the xc/xl changes to support Intel Cache Allocation
> > > > Technology(CAT). Two commands are introduced:
> > > > - xl psr-cat-hwinfo
> > > > Show CAT hardware information.
> > >
> > > > Examples:
> > > > [root@vmm-psr vmm]# xl psr-cat-hwinfo
> > > > Cache Allocation Technology (CAT):
> > > > Socket ID : 0
> > > > L3 Cache : 12288KB
> > > > Maximum COS : 15
> > > > CBM length : 12
> > > > Default CBM : 0xfff
> > > >
> > > Or, you can rename the psr-cmt-hwinfo command, added in the previous
> > > patch, to 'psr-hwinfo' and make it accept options, e.g.,
> > >
> > > "-m, --cmt show Cache Monitoring Technology (CMT) hardware info"
> > > "-c, --cat show Cache Allocation Technology (CAT) hardware info"
> > >
> > > By default (i.e., no options provided), it can just print all the hw
> > > info.
> > >
> > > Not a big deal, but I think that would make a better command line
> > > interface. Tools' maintainers' call, I guess.
> >
> > Thanks for suggestion.
> > >
> > > > --- a/tools/libxc/include/xenctrl.h
> > > > +++ b/tools/libxc/include/xenctrl.h
> > >
> > > > +
> > > > +int xc_psr_cat_set_domain_data(xc_interface *xch, uint32_t domid,
> > > > + xc_psr_cat_type type, uint32_t target,
> > > > + uint64_t data);
> > > > +int xc_psr_cat_get_domain_data(xc_interface *xch, uint32_t domid,
> > > > + xc_psr_cat_type type, uint32_t target,
> > > > + uint64_t *data);
> > > >
> > > So, for this twos, 'target' is the socket you want to act on.
> > >
> > > > +int xc_psr_cat_get_l3_info(xc_interface *xch, uint32_t socket,
> > > > + uint32_t *cos_max, uint32_t *cbm_len);
> > > >
> > > While here you use 'socket', to mean the same thing.
> > >
> > > That looks rather inconsistent. Since it's a socket we are talking
> > > about, why not 'socket' everywhere?
> >
> >
> > The idea behind here is: All the places that appear as 'target' imply
> > there are possible values other than just socket (e.g. considering L2
> > Cache Allocation in the future). So 'target' is always paired with a
> > 'psr_cat_type' parameter.
> >
> Mmm... I understand your concerns. So, sticking to the future L2 CAT
> support example, what would 'target' mean in that case, a pCPU? I'll
> have to be something that makes it possible to 'identify' an L2, as much
> as socket identifies an L3... Is this the case?
For L2, it's likely to be the cpu or core id, but not socket.
>
> I'm not sure. My own concerns are that, if I look at the prototypes of
> this functions, it's not that evident what values should I use for the
> type and target parameters, whether there are constraints/relationships
> among them, etc. That applies to both the xc_* functions above and the
> libxl_* functions below, IMO.
>
> Libxc is not a stable interface, so we could even just forget about
> this, design this very interface _only_ for what we have now and deal
> with different CBM types when we'll be introducing them. However, libxl
> *does* have a stable API, so we still need to solve the issue at that
> level.
>
> > For routines that only work for L3 (e.g.
> > xc_psr_cat_get_l3_info) then 'socket' is used. I admit that it looks
> > inconsistent, perhaps rename all 'socket' to 'target'?
> >
> No, IMO, that is one "good inconsistency", as it allows, at least for
> that function, to easily figure out what one should pass to the function
> by means of that parameter! :-)
>
> I really am not sure, and probably would have to know in what way(s)
> 'target' would change its meaning, depending on the value of 'type' (as
> asked above)... Probably what I'd do is leave parameters names as they
> are, but write a few doc-comments to explain how to use them, especially
> at the libxl level (libxc is a lot less critical, from this respect, I
> think).
OK, I can add some comments.
Thanks,
Chao
next prev parent reply other threads:[~2015-04-22 13:37 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-17 14:33 [PATCH v5 00/13] enable Cache Allocation Technology (CAT) for VMs Chao Peng
2015-04-17 14:33 ` [PATCH v5 01/13] x86: add socket_to_cpumask Chao Peng
2015-04-17 14:33 ` [PATCH v5 02/13] x86: improve psr scheduling code Chao Peng
2015-04-20 15:42 ` Dario Faggioli
2015-04-17 14:33 ` [PATCH v5 03/13] x86: detect and initialize Intel CAT feature Chao Peng
2015-04-20 16:13 ` Dario Faggioli
2015-04-21 9:39 ` Chao Peng
2015-04-17 14:33 ` [PATCH v5 04/13] x86: maintain COS to CBM mapping for each socket Chao Peng
2015-04-17 14:33 ` [PATCH v5 05/13] x86: add COS information for each domain Chao Peng
2015-04-20 15:50 ` Andrew Cooper
2015-04-17 14:33 ` [PATCH v5 06/13] x86: expose CBM length and COS number information Chao Peng
2015-04-17 14:33 ` [PATCH v5 07/13] x86: dynamically get/set CBM for a domain Chao Peng
2015-04-20 15:52 ` Andrew Cooper
2015-04-21 9:42 ` Chao Peng
2015-04-17 14:33 ` [PATCH v5 08/13] x86: add scheduling support for Intel CAT Chao Peng
2015-04-17 14:33 ` [PATCH v5 09/13] xsm: add CAT related xsm policies Chao Peng
2015-04-17 14:33 ` [PATCH v5 10/13] tools/libxl: minor name changes for CMT commands Chao Peng
2015-04-20 16:07 ` Dario Faggioli
2015-04-21 13:56 ` Ian Campbell
2015-04-17 14:33 ` [PATCH v5 11/13] tools/libxl: add command to show CMT hardware info Chao Peng
2015-04-21 0:37 ` Dario Faggioli
2015-04-21 9:42 ` Chao Peng
2015-04-21 13:57 ` Ian Campbell
2015-04-17 14:33 ` [PATCH v5 12/13] tools: add tools support for Intel CAT Chao Peng
2015-04-21 1:24 ` Dario Faggioli
2015-04-21 9:49 ` Chao Peng
2015-04-21 14:01 ` Ian Campbell
2015-04-21 14:39 ` Dario Faggioli
2015-04-22 13:09 ` Chao Peng
2015-04-21 15:15 ` Dario Faggioli
2015-04-22 13:37 ` Chao Peng [this message]
2015-04-17 14:33 ` [PATCH v5 13/13] docs: add xl-psr.markdown Chao Peng
2015-04-21 14:05 ` Ian Campbell
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=20150422133704.GB6566@pengc-linux.bj.intel.com \
--to=chao.p.peng@linux.intel.com \
--cc=Ian.Campbell@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=dario.faggioli@citrix.com \
--cc=dgdegra@tycho.nsa.gov \
--cc=keir@xen.org \
--cc=stefano.stabellini@eu.citrix.com \
--cc=wei.liu2@citrix.com \
--cc=will.auld@intel.com \
--cc=xen-devel@lists.xen.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.