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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
> ---

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

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]