All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chao Peng <chao.p.peng@linux.intel.com>
To: Wei Liu <wei.liu2@citrix.com>
Cc: Dario Faggioli <dario.faggioli@citrix.com>,
	xen-devel@lists.xen.org, Ian.Jackson@eu.citrix.com,
	Ian.Campbell@citrix.com, stefano.stabellini@eu.citrix.com
Subject: Re: [PATCH for Xen 4.6 2/5] tools/libxl: fix socket display error for CMT
Date: Tue, 29 Sep 2015 10:53:10 +0800	[thread overview]
Message-ID: <20150929025310.GE5813@pengc-linux.bj.intel.com> (raw)
In-Reply-To: <20150928153653.GN13821@zion.uk.xensource.com>

On Mon, Sep 28, 2015 at 04:36:54PM +0100, Wei Liu wrote:
> On Mon, Sep 28, 2015 at 05:06:31PM +0200, Dario Faggioli wrote:
> > On Mon, 2015-09-28 at 19:54 +0800, Chao Peng wrote:
> > 
> > > diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
> > > index 2706759..c72d3df 100644
> > 
> > > @@ -8228,9 +8228,9 @@ static void
> > > psr_cmt_print_domain_info(libxl_dominfo *dominfo,
> > >  
> > >  static int psr_cmt_show(libxl_psr_cmt_type type, uint32_t domid)
> > >  {
> > > -    uint32_t i, socketid, nr_sockets, total_rmid;
> > > +    uint32_t i, socketid, total_rmid;
> > >      uint32_t l3_cache_size;
> > > -    libxl_physinfo info;
> > > +    libxl_bitmap socketmap;
> > >      int rc, nr_domains;
> > >  
> > >      if (!libxl_psr_cmt_enabled(ctx)) {
> > > @@ -8244,41 +8244,38 @@ static int psr_cmt_show(libxl_psr_cmt_type
> > > type, uint32_t domid)
> > >          return -1;
> > >      }
> > >  
> > > -    libxl_physinfo_init(&info);
> > > -    rc = libxl_get_physinfo(ctx, &info);
> > > +    libxl_socket_bitmap_alloc(ctx, &socketmap, 0);
> > > +    rc = libxl_socket_bitmap_fill(ctx, &socketmap);
> > >
> > Shouldn't socketmap be initied with libxl_bitmap_init() before being
> > allocated and used?
> > 
> 
> Yes.
> 
> > Not doing so is certainly not an issue, in this case, but AFAIR, we
> 
> That's my thought when I first saw this patch.
> 
> > always require that for libxl types, don't we?
> > 
> 
> But let's stick with convention.

Sure, let's stick with it.

Chao

  reply	other threads:[~2015-09-29  2:53 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-28 11:54 [PATCH for Xen 4.6 0/5] Several PSR fixes in libxl Chao Peng
2015-09-28 11:54 ` [PATCH for Xen 4.6 1/5] tools/libxl: introduce libxl_socket_bitmap_fill Chao Peng
2015-09-28 14:12   ` Wei Liu
2015-09-28 14:53     ` Dario Faggioli
2015-09-28 14:57       ` Wei Liu
2015-09-29  2:47       ` Chao Peng
2015-09-29  2:49     ` Chao Peng
2015-09-28 11:54 ` [PATCH for Xen 4.6 2/5] tools/libxl: fix socket display error for CMT Chao Peng
2015-09-28 14:13   ` Wei Liu
2015-09-28 15:06   ` Dario Faggioli
2015-09-28 15:36     ` Wei Liu
2015-09-29  2:53       ` Chao Peng [this message]
2015-09-28 11:54 ` [PATCH for Xen 4.6 3/5] tools/libxl: return socket id from libxl_psr_cat_get_l3_info Chao Peng
2015-09-28 14:13   ` Wei Liu
2015-09-28 15:35     ` Dario Faggioli
2015-09-28 15:46       ` Wei Liu
2015-09-29  3:05         ` Chao Peng
2015-09-29  7:19           ` Dario Faggioli
2015-09-28 11:54 ` [PATCH for Xen 4.6 4/5] tools/libxl: fix range check in main_psr_cat_cbm_set Chao Peng
2015-09-28 14:14   ` Wei Liu
2015-09-28 15:16     ` Dario Faggioli
2015-09-28 11:54 ` [PATCH for Xen 4.6 5/5] docs: make xl-psr.markdown more precise Chao Peng
2015-09-28 14:14   ` Wei Liu
2015-09-28 15:15   ` Dario Faggioli
2015-09-28 14:16 ` [PATCH for Xen 4.6 0/5] Several PSR fixes in libxl Wei Liu
2015-09-28 15:42   ` Dario Faggioli
2015-09-29  3:08     ` 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=20150929025310.GE5813@pengc-linux.bj.intel.com \
    --to=chao.p.peng@linux.intel.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=dario.faggioli@citrix.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=wei.liu2@citrix.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.