On 2014/9/9 19:56, Peter Krempa wrote:
> + * VIR_DOMAIN_STATS_VCPU: Return virtual CPU statistics.
> > + * Due to VCPU hotplug, the vcpu.<num>.* array could be sparse.
> > + * The actual size of the array correspond to "vcpu.current".
> > + * The array size will never exceed "vcpu.maximum".
> > + * The typed parameter keys are in this format:
> > + * "vcpu.current" - current number of online virtual CPUs as unsigned
int.
> > + * "vcpu.maximum" - maximum number of online virtual CPUs as unsigned
int.
> > + * "vcpu.<num>.state" - state of the virtual CPU <num>,
as int
> > + * from virVcpuState enum.
> > + * "vcpu.<num>.time" - virtual cpu time spent by virtual CPU
<num>
> > + * as unsigned long long.
> > + * "vcpu.<num>.cpu" - physical CPU pinned to virtual CPU
<num> as int.
This is not the CPU number the vCPU is pinned to but rather the current
CPU number where the vCPU is actually running. If you pin it to multiple
CPUs this may change in the range of the host CPUs the vCPU is pinned
to. Said this I don't think this is an useful stat.
Rather than this I'd like to see the mask of the host CPUs where this
vCPU is pinned to. (returned as a human readable bitmask string).
Any thoughts?
IMO giving the vcpu's pininfo is more useful than the current pcpu number on which
vcpu is running *now*. (I don't know the requirement of management very well.)
But if it means the pininfo, what about naming it "vcpu.<num>.pin" or
other
name which is less confusing?