On 22.02.21 17:28, Peter Krempa wrote:
On Mon, Feb 22, 2021 at 16:57:11 +0100, David Hildenbrand wrote:
On 22.02.21 16:46, Michal Privoznik wrote:
On 2/18/21 4:00 PM, David Hildenbrand wrote:
On 18.02.21 14:31, Michal Privoznik wrote:

[...]

In QEMU, we could make "info balloon" etc. also include virtio-mem provided
memory.

The main reason I did not do so initially is that
1) It's racy when reading/writing the balloon size. The QEMU interface
    is broken as we don't get/set the size of the balloon size but
    instead the logical VM size. While someone sets the logical VM size
    via virtio-balloon, the logical VM size might change due to virtio-
    mem guest activity.
2) I don't want people to be tempted to use both at the same
    time.

Maybe the right think to do is make "info balloon" report the current
logical VM size. If there are races, bad luck - better not use both things
at the same time.

We specifically don't call info balloon or any equivalent nowadays if
qemu supports the balloon event and we should keep it like that at least
in terms of the active XML.

The bulk stats functions we have already call the monitor so it's okay
to do it there.

Both virtio-mem and balloon do have events so we should be able to
update any required definition bits without an explicit call to the
balloon info apart from the stats code and the refresh on reconnect.


Just to clarify, any BALLOON communication with the outer world (set/get/balloon_change) are in terms of "logical VM size", not "balloon size".

logical_vm_size = vm_size - balloon_size

vm_size does currently not include virtio-mem provided memory.

--
Thanks,

David / dhildenb

Reply via email to