On Thu, 20 Jun 2013 12:49:17 +0800 Saptarshi Sen <saptarshi....@gmail.com> wrote:
> Hi all, > > I am experimenting with the Virtio- balloon driver in qemu. > > When I set the balloon size to a arbitrary low value. I see > the actual value of the balloon set is not what I intended > but to a level probably decided by the system. A few things might be happening there. Maybe the guest is just slow and is still inflating the balloon when you type 'info balloon'. Or the guest may be running out of memory and is temporarily unable to keep inflating the balloon. Finally, if the guest runs out of memory (because you inflated too much) it may OOPs and then you won't see any balloon activity anymore. > I am not able to explain this part who decides on the final > size of the balloon. > > Another observation each time I do a qmp request to deflate the balloon > the in the virtio-balloon.c config_set_size function is called. I do not > understand who calls it and the method of activation There's no such function in virtio-balloon.c, at least not in latest git HEAD. Are you referring to virtio_balloon_set_config()? This function is called when the virtio balloon driver in the guest wants to update the balloon size.