|
From: | Anthony Liguori |
Subject: | Re: [Qemu-devel] Re: [PATCH 08/11] QMP: Port balloon command |
Date: | Tue, 23 Jun 2009 08:59:42 -0500 |
User-agent: | Thunderbird 2.0.0.21 (X11/20090320) |
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
[Prev in Thread] | Current Thread | [Next in Thread] |