From: Alexander Atanasov <alexander.atanasov@xxxxxxxxxxxxx> Sent: Tuesday, July 5, 2022 2:44 AMvirtio efforts:
Allow the guest to know how much it is ballooned by the host.Thanks for the contribution! I can see it being useful. But I'd note
It is useful when debugging out of memory conditions.
When host gets back memory from the guest it is accounted
as used memory in the guest but the guest have no way to know
how much it is actually ballooned.
Expose current state, flags and max possible memory to the guest.
that the existing code has a trace function that outputs pretty much all
the same information when it is reported to the Hyper-V host in
post_status() every 1 second. However, the debugfs interface might be
a bit easier to use for ongoing sampling. Related, I see that the VMware
balloon driver use the debugfs interface, but no tracing. The virtio
balloon driver has neither. I'm not against adding this debugfs interface,
but I wanted to make sure there's real value over the existing tracing.
See also some minor comments below.