]> xenbits.xensource.com Git - libvirt.git/commit
nodeinfo: improve probing node cpu bitmap
authorEric Blake <eblake@redhat.com>
Wed, 24 Oct 2012 22:43:26 +0000 (16:43 -0600)
committerEric Blake <eblake@redhat.com>
Thu, 25 Oct 2012 17:20:08 +0000 (11:20 -0600)
commit2f4c5338a6a7298e8bc4e1843a12318c512b32c1
tree8d9ee08eed9f9b83643e7e4c675ba546daf8fe88
parent0711c4b74d1f0e83b06c5b15a50f99d780478566
nodeinfo: improve probing node cpu bitmap

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.
src/libvirt_private.syms
src/nodeinfo.c
src/nodeinfo.h
src/qemu/qemu_driver.c