From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NSuCB-0002Eq-3Z for qemu-devel@nongnu.org; Thu, 07 Jan 2010 10:22:43 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NSuC6-0002By-Cd for qemu-devel@nongnu.org; Thu, 07 Jan 2010 10:22:42 -0500 Received: from [199.232.76.173] (port=54864 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NSuC6-0002Bq-5N for qemu-devel@nongnu.org; Thu, 07 Jan 2010 10:22:38 -0500 Received: from mail-yw0-f176.google.com ([209.85.211.176]:46047) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NSuC5-0004xH-Tj for qemu-devel@nongnu.org; Thu, 07 Jan 2010 10:22:38 -0500 Received: by ywh6 with SMTP id 6so18522938ywh.4 for ; Thu, 07 Jan 2010 07:22:36 -0800 (PST) Message-ID: <4B45FC3A.6000900@codemonkey.ws> Date: Thu, 07 Jan 2010 09:22:34 -0600 From: Anthony Liguori MIME-Version: 1.0 References: <1262711318.10698.104.camel@aglitke> <4B45F9CA.7050903@codemonkey.ws> <4B45FB52.402@redhat.com> In-Reply-To: <4B45FB52.402@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed 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: Avi Kivity Cc: Luiz Capitulino , qemu-devel , Adam Litke 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