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

Re: [Xen-devel] libvirt/libxl implemetation of get_online_cpu / virNodeGetCPUMap?

On Tue, 2015-02-24 at 13:10 +0000, Ian Campbell wrote:
> On Tue, 2015-02-24 at 12:41 +0000, Anthony PERARD wrote:

> > What libxl API those provide this information, if it exist?
> > 
> > I found libxl_get_online_cpus() but that not enough. They want a
> > bitmap.
> I think that is all which currently exists, at least at the libxl level,
> you may need to add a new interface.
> It'd be worth looking into the various host numa interfaces -- perhaps
> one of them indirectly exposes what you want?
Given Daniel's latest emails, I'm not sure this is useful but
libxl_get_cpu_topology() should put LIBXL_CPUTOPOLOGY_INVALID_ENTRY in
all the fields of the i-eth element of the array it returns, if the
i-eth pcpu is offline (see the implementation of XEN_SYSCTL_topologyinfo
in xen/common/sysctl.c).

So, scanning that array and constructing the bitmap according to whether
or not we find that marker on the various elements would be the way to
go, I would say.

I've actually never tested this, i.e., I've never tried offlining a pcpu
on the host. I'll give it a go as soon as I find 5 minutes, and let know
if it works.


Attachment: signature.asc
Description: This is a digitally signed message part

Xen-devel mailing list



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