[libvirt] [PATCH] bhyve: implement domainGetCPUStats

Daniel P. Berrange berrange at redhat.com
Wed Apr 30 12:57:13 UTC 2014


On Wed, Apr 30, 2014 at 02:51:18PM +0200, Ján Tomko wrote:
> On 04/30/2014 12:03 PM, Daniel P. Berrange wrote:
> > On Tue, Apr 29, 2014 at 08:54:26PM +0400, Roman Bogorodskiy wrote:
> >>
> >> Looks like FreeBSD does not support such kind of per-cpu reporting for
> >> host cpus. Just to make sure I didn't miss something, I asked that
> >> question of the FreeBSD virtualization maillist and looks like I'm right
> >> about that [1].
> >>
> >> Would it better to abandon this feature for now and wait when it'd be
> >> supported (I'm not sure if/when it's going to happen), or just leave the
> >> code that reports only the stats for all cpus?
> > 
> > I think it is better to leave it unsupported, so apps can see the
> > VIR_ERR_NO_SUPPORT error and not mistakenly interpret incorrect data.
> > 
> 
> The apps should check how many stat parameters are supported for a given pCPU
> by calling virDomainGetCPUStats with nparams=0 and/or check the actual number
> of stats returned.
> 
> Could we return valid results for total CPU stats (start_cpu = -1) and just
> not return any for all other start_cpu values?

Wouldn't that just be duplicating what we already provide via the
virDomainGetInfo cpuTime field ? If so it doesn't seem like we need
to add this feature to virDomainGetCPUStats too ?


Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the libvir-list mailing list