[libvirt] [PATCHv3 2/4] nodeinfo: improve probing node cpu bitmap

Eric Blake eblake at redhat.com
Thu Oct 25 18:49:50 UTC 2012


On 10/24/2012 07:36 PM, Eric Blake wrote:
> Callers should not need to know what the name of the file to
> be read in the Linux-specific version of nodeGetCPUmap;
> furthermore, qemu cares about online cpus, not present cpus,
> when determining which cpus to skip.
> 
> While at it, I fixed the fact that we were computing the maximum
> online cpu id by doing a slow iteration, when what we really want
> to know is the max available cpu.
> 
> * src/nodeinfo.h (nodeGetCPUmap): Rename...
> (nodeGetCPUBitmap): ...and simplify signature.
> * src/nodeinfo.c (linuxParseCPUmax): New function.
> (linuxParseCPUmap): Simplify and alter signature.
> (nodeGetCPUBitmap): Change implementation.
> * src/libvirt_private.syms (nodeinfo.h): Reflect rename.
> * src/qemu/qemu_driver.c (qemuDomainGetPercpuStats): Update
> caller.

Shoot.  Now that I've pushed this, I'm getting:

# virsh cpu-stats dom
error: Failed to virDomainGetCPUStats()

error: An error occurred, but the cause is unknown

on a host with 6 out of 8 cpus online, where it gave reasonable answers
pre-patch.  I'm still investigating.

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 617 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20121025/3b1f0abd/attachment-0001.sig>


More information about the libvir-list mailing list