Re: [PATCH v3 10/14] qemu: Account for both memballoon and virtio-mem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 23, 2021 at 15:24:32 +0200, Michal Privoznik wrote:
> Reporting how much memory is exposed to the guest happens under
> <currentMemory/> which is taken from def->mem.cur_balloon. The
> reported amount should account for both balloon size and the sum
> of @actualsize of all virtio-mems. For instance, if domain has
> 4GiB via balloon and additional 2GiB via virtio-mem, then the
> domain XML should report 6GiB. The same applies for domain
> statistics.
> 
> The way to achieve this is to account for either balloon or
> virtio-mem when the size of the other is changed, e.g. on balloon
> change we have to add all @actualsize (for non virtio-mem these
> will be zero, so the check for memory model is needless, but
> makes it more obvious what's happening), and vice versa.

I think this needs to be recorded in a comment where the update happens.
Also the detail that the virtio-mem size isn't actually included in the
balloon size reported by qemu, because that's a rather important quirk
of all of this.


> 
> Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
> ---
>  src/qemu/qemu_driver.c  |  4 ++++
>  src/qemu/qemu_process.c | 17 +++++++++++++++++
>  2 files changed, 21 insertions(+)

The code looks okay, but I'll do a final review with the comments in
place.




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux