From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=34199 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Op0PJ-0005do-V3 for qemu-devel@nongnu.org; Fri, 27 Aug 2010 10:59:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Op0PI-0005lU-Fa for qemu-devel@nongnu.org; Fri, 27 Aug 2010 10:59:53 -0400 Received: from mail-qy0-f180.google.com ([209.85.216.180]:51608) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Op0PI-0005lL-CN for qemu-devel@nongnu.org; Fri, 27 Aug 2010 10:59:52 -0400 Received: by qyk31 with SMTP id 31so3070870qyk.4 for ; Fri, 27 Aug 2010 07:59:51 -0700 (PDT) Message-ID: <4C77D2EB.1030306@codemonkey.ws> Date: Fri, 27 Aug 2010 09:59:55 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [PATCH v3 2/3] qerror: Add a new MACHINE_STOPPED error message References: <51ec99ce2db02aeb34ec6683a76895b4a127057d.1282886503.git.amit.shah@redhat.com> <20100827092945.GC22361@redhat.com> <4C77B209.6050902@codemonkey.ws> <20100827125827.GD22361@redhat.com> <20100827111507.5278eba3@doriath> In-Reply-To: <20100827111507.5278eba3@doriath> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: qemu list , Markus Armbruster , agl@us.ibm.com, Amit Shah , Paolo Bonzini On 08/27/2010 09:15 AM, Luiz Capitulino wrote: > > I wondered if we could drop it for now to make it right in 0.14, but I > believe it's already part of the user monitor for some time and libvirt > uses the stats, right? > > I think we need testing/unstable namespace in QMP, where commands can be > tested for while so that we reduce the risk of nasty surprises like this one. > It's trying to plug a sieve with a band-aid. It's certainly an "improvement" but it's of question utility looking at the bigger picture. Balloon is a perfect example of where what we really need to do is build interface interfaces that make sense, and then expose them in QMP. What's a reasonable C-level API to query statistics that potentially may never return? Building in a timeout is something of a crappy API because it puts policy deep in the API that is trivial to implement elsewhere. What you'd probably do is something like: BalloonStatsRequest *query_guest_balloon_stats(CompletionCallback *cb, void *opaque); int cancel_guest_balloon_stats(BalloonStatsRequest *req); void release_guest_balloon_stats(BalloonStatsRequest *req); Regards, Anthony Liguori >> >>> Beyond fixing that regression, I agree that this command is terminally >>> flawed& we need to deprecate it& provide better specified new >>> replacement(s). This seems like 0.14 work to me though. >>> >> Yup. >> >> >>> Regards, >>> Daniel >>> >>> [1] I know that they could already suffer if there was a bug in qemu >>> that prevented it responding, even if the guest was not being >>> malicious/crashed. >>> >> >