Re: [PATCH v1 1/2] Enable balloon drivers to report inflated memory

From: Alexander Atanasov
Date: Wed Aug 10 2022 - 01:14:30 EST


Hello,

On 10.08.22 6:05, Muchun Song wrote:


On Aug 9, 2022, at 17:49, Alexander Atanasov <alexander.atanasov@xxxxxxxxxxxxx> wrote:

Display reported in /proc/meminfo as:

Hi,

I am not sure if this is a right place (meminfo) to put this statistic in since
it is the accounting from a specific driver. IIUC, this driver is only installed
in a VM, then this accounting will always be zero if this driver is not installed.
Is this possible to put it in a driver-specific sysfs file (maybe it is better)?
Just some thoughts from me.

Yes, it is only used if run under hypervisor but it is under a config option for that reason.

There are several balloon drivers that will use it, not only one driver - virtio, VMWare, HyperV, XEN and possibly others. I made one as an example. Initially i worked on a patches for debugfs but discussion lead to put it into a centralized place.

--
Regards,
Alexander Atanasov