[libvirt] [PATCH] qemu: bulk stats: add pcpu placement information

Eric Blake eblake at redhat.com
Wed Dec 10 17:16:07 UTC 2014


On 12/10/2014 05:39 AM, Francesco Romani wrote:
> This patch adds the information about the physical cpu
> placement of virtual cpus for bulk stats.
> 
> This is the only difference in output with the
> virDomainGetVcpus() API.
> Management software, like oVirt, needs this information
> to properly manage NUMA configurations.
> 
> Signed-off-by: Francesco Romani <fromani at redhat.com>
> ---

> +++ b/src/libvirt-domain.c
> @@ -10888,6 +10888,8 @@ virConnectGetDomainCapabilities(virConnectPtr conn,
>   *                      from virVcpuState enum.
>   * "vcpu.<num>.time" - virtual cpu time spent by virtual CPU <num>
>   *                     as unsigned long long.
> + * "vcpu.<num>.physical" - real CPU number on which virtual CPU <num> is
> + *                         running, or -1 if offline.

As which type?

> +        if (virTypedParamsAddULLong(&record->params,
> +                                    &record->nparams,
> +                                    maxparams,
> +                                    param_name,
> +                                    cpuinfo[i].cpu) < 0)

ULLong cannot hold -1.  Is 'int' sufficient, since physical CPU numbers
will never exceed 32 signed bits? (A machine with 2 billion cores seems
unlikely...)

-- 
Eric Blake   eblake 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: 539 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20141210/1dfd4ce9/attachment-0001.sig>


More information about the libvir-list mailing list