From: Dario Faggioli <dario.faggioli@citrix.com>
To: Wei Liu <wei.liu2@citrix.com>,
Chao Peng <chao.p.peng@linux.intel.com>,
g@zion.uk.xensource.com
Cc: 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 3/5] tools/libxl: return socket id from libxl_psr_cat_get_l3_info
Date: Mon, 28 Sep 2015 17:35:56 +0200 [thread overview]
Message-ID: <1443454556.3276.98.camel@citrix.com> (raw)
In-Reply-To: <20150928141356.GD13821@zion.uk.xensource.com>
[-- Attachment #1.1: Type: text/plain, Size: 2144 bytes --]
On Mon, 2015-09-28 at 15:13 +0100, Wei Liu wrote:
> On Mon, Sep 28, 2015 at 07:54:51PM +0800, Chao Peng wrote:
> > diff --git a/tools/libxl/libxl_psr.c b/tools/libxl/libxl_psr.c
> > index 3378239..10e1113 100644
> > @@ -339,7 +339,8 @@ int libxl_psr_cat_get_l3_info(libxl_ctx *ctx,
> > libxl_psr_cat_info **info,
> > {
> > GC_INIT(ctx);
> > int rc;
> > - int i, nr_sockets;
> > + int i = 0, socket, nr_sockets;
> > + libxl_bitmap socketmap;
> > libxl_psr_cat_info *ptr;
> >
> > rc = libxl__count_physical_sockets(gc, &nr_sockets);
> > @@ -348,21 +349,31 @@ int libxl_psr_cat_get_l3_info(libxl_ctx *ctx,
> > libxl_psr_cat_info **info,
> > goto out;
> > }
>
> This is a path that you call libxl_bitmap_dispose on an uninitialised
> socketmap.
>
Yep.
However, do we still need to go through libxl__count_physical_sockets()
explicitly? AFAICS, you need it for allocating ptr, and for returning
it back.
But since now you're building the full bitmap, we can use
libxl_bitmap_count_set(), for that.
This may not be a bit deal, but if I'm not wrong, it saves us an
hypercall (the PHYSINFO that libxl__count_physical_socket() issues).
> > --- a/tools/libxl/libxl_types.idl
> > +++ b/tools/libxl/libxl_types.idl
> > @@ -792,6 +792,7 @@ libxl_psr_cbm_type =
> > Enumeration("psr_cbm_type", [
> > ])
> >
> > libxl_psr_cat_info = Struct("psr_cat_info", [
> > + ("target_id", uint32),
>
> Or just call it "socket_id"? Or even just "id" because you know this
> structure is for socket?
>
Yeah, we discussed this already, AFAICR. I think the point is that, at
least in theory, these features may be extended to become more fine
-grained than per-socket, hence the point of not binding the interface
to sockets.
That being said, FWIW, I'm fine either way.
Regards,
Dario
--
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2015-09-28 15:35 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
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 [this message]
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=1443454556.3276.98.camel@citrix.com \
--to=dario.faggioli@citrix.com \
--cc=Ian.Campbell@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=chao.p.peng@linux.intel.com \
--cc=g@zion.uk.xensource.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.