[libvirt] libvirt/libxl implemetation of get_online_cpu / virNodeGetCPUMap?

Ian Campbell ian.campbell at citrix.com
Tue Feb 24 13:10:59 UTC 2015


On Tue, 2015-02-24 at 12:41 +0000, Anthony PERARD wrote:
> Hi,
> 
> A recent OpenStack nova commit make use of virNodeGetCPUMap to get the list
> of online cpu of a host. But this API is not implemented for the libvirt
> xen driver.
> 
> The commit:
>   Add handling for offlined CPUs to the nova libvirt driver.
> https://review.openstack.org/gitweb?p=openstack/nova.git;a=commitdiff;h=0696a5cd5f0fdc08951a074961bb8ce0c3310086
> 
> Is there a need to use this under Xen? (Is it possible to have offline
> CPU?).

Yes, I think so. No idea how you use it though.

> 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?

Ian.




More information about the libvir-list mailing list