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(a)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