[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v3 8/8] tools: add tools support for Intel CAT



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).

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@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.