From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MJ6XT-0007B6-VM for qemu-devel@nongnu.org; Tue, 23 Jun 2009 09:59:55 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MJ6XO-00079A-Ps for qemu-devel@nongnu.org; Tue, 23 Jun 2009 09:59:55 -0400 Received: from [199.232.76.173] (port=57995 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MJ6XO-000794-IE for qemu-devel@nongnu.org; Tue, 23 Jun 2009 09:59:50 -0400 Received: from fg-out-1718.google.com ([72.14.220.157]:13154) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MJ6XO-00006y-3B for qemu-devel@nongnu.org; Tue, 23 Jun 2009 09:59:50 -0400 Received: by fg-out-1718.google.com with SMTP id l27so868575fgb.8 for ; Tue, 23 Jun 2009 06:59:48 -0700 (PDT) Message-ID: <4A40DFCE.5050008@codemonkey.ws> Date: Tue, 23 Jun 2009 08:59:42 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [PATCH 08/11] QMP: Port balloon command References: <20090623012933.5b217767@doriath> <4A40A386.7020102@redhat.com> In-Reply-To: <4A40A386.7020102@redhat.com> 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: Avi Kivity Cc: aliguori@us.ibm.com, ehabkost@redhat.com, jan.kiszka@siemens.com, dlaor@redhat.com, qemu-devel@nongnu.org, Luiz Capitulino Avi Kivity wrote: > On 06/23/2009 07:29 AM, Luiz Capitulino wrote: >> else if (actual == 0) >> - monitor_printf(mon, "Ballooning not activated in VM\n"); >> + monitor_printf_err(mon, "Ballooning not activated in VM\n"); >> else >> - monitor_printf(mon, "balloon: actual=%d\n", (int)(actual>> >> 20)); >> + monitor_printf_data(mon, "balloon: actual=%d\n", >> (int)(actual>> 20)); >> } >> > > Control mode should always use bytes and seconds (and this should be > described in the spec). You avoid rounding, and more importantly, > ambiguity and a source of unit conversion errors. I'd actually like to see a lot more structure in this sort of output. For instance: monitor_printf_list(mon, "balloon", "actual", MON_TIME, actual, NULL); How this gets output can then be conditional on control mode vs. human mode. In human mode, we can use human-friendly units like MBs. In control mode, we would always use bytes. > Patched that add a command to machine mode without updating the spec > should be automatically NACKed. > > We also need a way to discover that the command is available: I think we want to version each command too. Regards, Anthony Liguori