From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60620) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Upj3I-0000xM-Cm for qemu-devel@nongnu.org; Thu, 20 Jun 2013 13:53:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Upj3H-0004QR-Ai for qemu-devel@nongnu.org; Thu, 20 Jun 2013 13:53:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47932) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Upj3H-0004Pi-49 for qemu-devel@nongnu.org; Thu, 20 Jun 2013 13:53:43 -0400 Date: Thu, 20 Jun 2013 13:53:39 -0400 From: Luiz Capitulino Message-ID: <20130620135339.392a4632@redhat.com> In-Reply-To: References: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] Virtio-Balloon : config_set_size List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Saptarshi Sen Cc: qemu-devel@nongnu.org On Thu, 20 Jun 2013 12:49:17 +0800 Saptarshi Sen 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.