On Wed, May 24, 2017 at 12:49:58PM +0200, Michal Privoznik wrote:
That's quite exact. I mean the word 'guessing'. We
can't really provide
reliable way of dealing with what you're suggesting (unless we cut the
limit really small) nor we can guarantee atomicity. Therefore I think it
would be a waste of time to work on this. Yes, it can be done, but the
benefits are pretty small IMO.
Why is atomicity a problem? Just structure the libvirtd
messages so that you have:
COLLECT_THE_STATS
- saves the stats into an internal buffer in libvirtd
and returns a handle and a number of stat items
RETURN_THE_STATS
- returns partial subset of previously collected stats,
called multiple times to transfer the data back to libvirt
FREE_THE_STATS
- free the internal buffer
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html