[libvirt] [PATCH] cpumap: optimize for clients that don't need online count

Eric Blake eblake at redhat.com
Fri Nov 2 02:58:43 UTC 2012


On 11/01/2012 08:17 PM, Laine Stump wrote:
> On 11/01/2012 09:57 PM, Eric Blake wrote:
>> It turns out that calling virNodeGetCPUMap(conn, NULL, NULL, 0)
>> is both useful, and with Viktor's patches, common enough to
>> optimize.  Since this interface hasn't been released yet, we
>> can change the RPC call.
>>

> 
> After a small bit of explaining the context surrounding the change on
> IRC, I understand what's going on and the benefit, and I agree that it's
> either now or never.
> 
> ACK.

Thanks.  I edited the commit message to mention some of the context
(finding the max cpu is one sysfs file, but finding the bitmap of cpus
to determine which cpus are online involves more file reads, possibly
one per cpu depending on the age of the kernel, which can add up to a
lot of worthless syscalls if the caller passed NULL for both
parameters).  Now pushed.

-- 
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/20121101/c8c6390f/attachment-0001.sig>


More information about the libvir-list mailing list