Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NSuT3-0001h2-V7 for qemu-devel@nongnu.org; Thu, 07 Jan 2010 10:40:10 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NSuSy-0001Xq-AI for qemu-devel@nongnu.org; Thu, 07 Jan 2010 10:40:09 -0500 Received: from [199.232.76.173] (port=45116 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NSuSx-0001XW-UK for qemu-devel@nongnu.org; Thu, 07 Jan 2010 10:40:03 -0500 Received: from e33.co.us.ibm.com ([32.97.110.151]:48420) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NSuSx-00038Y-HJ for qemu-devel@nongnu.org; Thu, 07 Jan 2010 10:40:03 -0500 Received: from d03relay04.boulder.ibm.com (d03relay04.boulder.ibm.com [9.17.195.106]) by e33.co.us.ibm.com (8.14.3/8.13.1) with ESMTP id o07FapOI009351 for ; Thu, 7 Jan 2010 08:36:51 -0700 Received: from d03av06.boulder.ibm.com (d03av06.boulder.ibm.com [9.17.195.245]) by d03relay04.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o07Fdq8P190502 for ; Thu, 7 Jan 2010 08:39:52 -0700 Received: from d03av06.boulder.ibm.com (loopback [127.0.0.1]) by d03av06.boulder.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id o07FfhJU005995 for ; Thu, 7 Jan 2010 08:41:44 -0700 From: Adam Litke In-Reply-To: <4B45FC3A.6000900@codemonkey.ws> References: <1262711318.10698.104.camel@aglitke> <4B45F9CA.7050903@codemonkey.ws> <4B45FB52.402@redhat.com> <4B45FC3A.6000900@codemonkey.ws> Content-Type: text/plain; charset="UTF-8" Date: Thu, 07 Jan 2010 09:39:42 -0600 Message-ID: <1262878782.2767.5.camel@aglitke> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [RFD] virtio: Add memory statistics reporting to the balloon driver List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Luiz Capitulino , Avi Kivity , qemu-devel Thanks for the ideas and feedback. I will play around with #4 and see if I can hack up a prototype. On Thu, 2010-01-07 at 09:22 -0600, Anthony Liguori wrote: > On 01/07/2010 09:18 AM, Avi Kivity wrote: > > On 01/07/2010 05:12 PM, Anthony Liguori wrote: > >> > >> 3) Make qemu request balloon stats regularly (maybe every 10 seconds) > >> and display the latest stats with info balloon. This avoids the > >> problem in #2 but it means that qemu determines the poll rate instead > >> of a management tool. > >> > >> 4) Make info-balloon a proper asynchronous command. We need new > >> infrastructure to allow a qmp handler to take a callback that can be > >> used to delay the completion of the command. This addresses all of > >> the above problems but it introduces a new one. Command completion > >> now depends on the guest. This potentially could trip up a naive > >> management tool that doesn't realize that the info-balloon command > >> may never complete. > >> > >> I'm on the fence between 3 and 4 myself. > >> > > > > Can I tip you over to #4? #3 means we have no idea when the stats > > were generated. With #4, we can't be sure, but it usually be close to > > when the command returns. > > > > The command should include a timeout so a broken guest won't hang a > > management tool thread. > > Generally, timeouts are evil but if we did something like, wait 10 > seconds and if we don't hear a response from the guest, return the last > data set, I think I would be okay with that. It means we may be > reporting stale data, but at the same time, the data is coming from a > guest so it can't be considered authoritative anyway. > > Regards, > > Anthony Liguori -- Thanks, Adam