All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: Wei Liu <wei.liu2@citrix.com>
Cc: Chao Peng <chao.p.peng@linux.intel.com>,
	will.auld@intel.com, stefano.stabellini@eu.citrix.com,
	Ian.Jackson@eu.citrix.com, xen-devel@lists.xen.org
Subject: Re: [PATCH v9 3/3] tools, docs: add total/local memory bandwith monitoring
Date: Mon, 23 Feb 2015 16:24:32 +0000	[thread overview]
Message-ID: <1424708672.27930.204.camel@citrix.com> (raw)
In-Reply-To: <20150213130911.GX13644@zion.uk.xensource.com>

On Fri, 2015-02-13 at 13:09 +0000, Wei Liu wrote:
> On Mon, Feb 02, 2015 at 04:06:09PM +0800, Chao Peng wrote: 
> > +#ifdef LIBXL_HAVE_PSR_MBM
> > +int libxl_psr_cmt_type_supported(libxl_ctx *ctx, libxl_psr_cmt_type type);
> > +int libxl_psr_cmt_get_mem_bandwidth_sample(libxl_ctx *ctx,
> > +                                           uint32_t domid,
> > +                                           uint32_t socketid,
> > +                                           bool     total,
> > +                                           uint64_t *sample_r,
> > +                                           uint64_t *tsc_r);
> 
> Should the interface be only limited to socket level? Do you (Intel) has
> plan to provide bandwidth sampling on finer grain level (say, core
> level)?

If we assume not then obviously some h/w designer will implement it ;-)

The existing libxl_psr_cmt_get_l3_cache_size has uint32_t socketid
though, so we may as well do the same here and fixup everything at once
if it ever happens.

> I also assume that you will never have third type of memory bandwidth?
> I.e. do we need to change boolean total to a enum?

There is already an enum, but some of the values it has don't really fit
this interface (the "l3_cache_size" isn't really a stat which needs
sampling), cf my wonder in response to v8 "if wedging all of these
logically unrelated statistics into an umbrella psr interface at the
libxl level makes sense."

Perhaps just call this interface psr_cmt_get_sample, pass it the enum
and always return a tsc? Then other types of stats sampling would fit in
the future, hopefully.

No reason to exclude l3_cache_size from it even if it is a bit pointless
to use this interface for it instead of the dedicated one.

Ian.

  reply	other threads:[~2015-02-23 16:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-02  8:06 [PATCH v9 0/3] enable Memory Bandwidth Monitoring (MBM) for VMs Chao Peng
2015-02-02  8:06 ` [PATCH v9 1/3] tools: correct coding style for psr Chao Peng
2015-02-02  8:06 ` [PATCH v9 2/3] tools: code refactoring for MBM Chao Peng
2015-02-02  8:06 ` [PATCH v9 3/3] tools, docs: add total/local memory bandwith monitoring Chao Peng
2015-02-13 13:09   ` Wei Liu
2015-02-23 16:24     ` Ian Campbell [this message]
2015-02-25 10:21       ` Chao Peng
2015-02-25 10:33         ` Ian Campbell
2015-02-04  8:39 ` [PATCH v9 0/3] enable Memory Bandwidth Monitoring (MBM) for VMs Chao Peng
2015-02-04  8:53   ` Jan Beulich
2015-02-04 11:46     ` Chao Peng
2015-02-11 11:09 ` Chao Peng

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=1424708672.27930.204.camel@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=chao.p.peng@linux.intel.com \
    --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.