All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chao Peng <chao.p.peng@linux.intel.com>
To: Ian Campbell <ian.campbell@citrix.com>
Cc: keir@xen.org, 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 v3 8/8] tools: add tools support for Intel CAT
Date: Tue, 7 Apr 2015 16:57:40 +0800	[thread overview]
Message-ID: <20150407085740.GE3404@pengc-linux.bj.intel.com> (raw)
In-Reply-To: <20150402031553.GA3404@pengc-linux.bj.intel.com>

On Thu, Apr 02, 2015 at 11:15:53AM +0800, Chao Peng wrote:
> On Wed, Apr 01, 2015 at 10:23:01AM +0100, Ian Campbell wrote:
> > On Wed, 2015-04-01 at 17:06 +0800, Chao Peng wrote:
> > > > > If this one returns all sockets but not a specified socket data (which I agreed)
> > > > > and not consider legacy cmt code, then I think I can make
> > > > > libxl_count_physical_sockets() private and move it to libxl/libxl_psr.c.
> > > > 
> > > > What is the legacy cmt code? But otherwise I agree, yes.
> > > 
> > > In libxl/xl_cmdimpl.c, psr_cmt_show also calculates the socket count
> > > itself. If we want to refactor it with new libxl_count_physical_sockets
> > > then libxl_count_physical_sockets should be public, otherwise it can be
> > > private to libxl_psr.c only. From my side, both directions sound OK.
> > 
> > Ah, so we would want a "return a list of all sockets" variant of
> > libxl_psr_cmt_get_cache_occupancy too? I think that's fine, we need to
> > keep the old interface but we could easily add a new one, e.g.
> > libxl_psr_cmt_get_all_cache_occupancy (insert the word "sockets" if you
> > like).
> 
> The libxl_psr_cmt_get_cache_occupancy is actually not used in xl anymore
> and should be considered as obsolete. Substitute is
> libxl_psr_cmt_get_sample which is the common API for both cache
> occupancy and memory bandwidth(For the latter the routine will be called
> twice). So if we really want to do everything batch in libxl then
> perhaps we should do that for libxl_psr_cmt_get_sample.
> 
> The other candidate is libxl_psr_cmt_get_l3_cache_size, which can also
> do batch in libxl. 
> 
> While there is also drawback: If both
> libxl_psr_cmt_get_sample/libxl_psr_cmt_get_l3_cache_size do their
> batches in libxl, then libxl_count_physical_sockets will be called twice
> in libxl which may bring performance drop.
> 
> Another solution is only do batch for libxl_psr_cmt_get_l3_cache_size.
> It returns all sockets's cache size and meantime the socket number. Once
> we get socket number, other functions(Both libxl_psr_cmt_get_sample for
> CMT/MBM and libxl_psr_cat_get_l3_info/libxl_psr_cat_get_cbm for CAT)
> can be called socket by socket in xl.

Ian, does this solution sounds OK to you?
Chao
> > 
> > So both interfaces would be something like:
> >    int libxl_psr_....(ctx, domid, TYPE **list_r, int *nr);
> > 
> > And on success *list_r points to a newly allocated array and *nr is the
> > number of elements in that array. TYPE depends on which op it is, so for
> > cache_occupancy it seems a uint32_t.
> > 
> > Is the socket address space always contiguous and starting at zero? If
> > not then the array might need to contain (socket,TYPE) structs.
> > 
> > Ian.
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

      reply	other threads:[~2015-04-07  8:57 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-26 12:38 [PATCH v3 0/8] enable Cache Allocation Technology (CAT) for VMs Chao Peng
2015-03-26 12:38 ` [PATCH v3 1/8] x86: clean up psr boot parameter parsing Chao Peng
2015-03-26 20:42   ` Andrew Cooper
2015-03-26 12:38 ` [PATCH v3 2/8] x86: improve psr scheduling code Chao Peng
2015-03-27 18:15   ` Andrew Cooper
2015-03-26 12:38 ` [PATCH v3 3/8] x86: detect and initialize Intel CAT feature Chao Peng
2015-03-27 18:31   ` Andrew Cooper
2015-04-13 10:51     ` Jan Beulich
2015-04-13 10:58       ` Andrew Cooper
2015-03-26 12:38 ` [PATCH v3 4/8] x86: add support for COS/CBM manangement Chao Peng
2015-03-27 20:16   ` Andrew Cooper
2015-03-31  8:40     ` Chao Peng
2015-03-26 12:38 ` [PATCH v3 5/8] x86: add scheduling support for Intel CAT Chao Peng
2015-03-26 12:38 ` [PATCH v3 6/8] xsm: add CAT related xsm policies Chao Peng
2015-03-26 12:38 ` [PATCH v3 7/8] tools/libxl: introduce libxl_count_physical_sockets Chao Peng
2015-03-30 14:51   ` Wei Liu
2015-03-31  8:51     ` Chao Peng
2015-03-31 16:11       ` Ian Campbell
2015-03-26 12:38 ` [PATCH v3 8/8] tools: add tools support for Intel CAT Chao Peng
2015-03-31 16:28   ` Ian Campbell
2015-04-01  7:55     ` Chao Peng
2015-04-01  8:41       ` Ian Campbell
2015-04-01  9:06         ` Chao Peng
2015-04-01  9:23           ` Ian Campbell
2015-04-02  3:15             ` Chao Peng
2015-04-07  8:57               ` Chao Peng [this message]

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=20150407085740.GE3404@pengc-linux.bj.intel.com \
    --to=chao.p.peng@linux.intel.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=dgdegra@tycho.nsa.gov \
    --cc=ian.campbell@citrix.com \
    --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.