qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Luiz Capitulino <lcapitulino@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: aliguori@us.ibm.com, ehabkost@redhat.com, jan.kiszka@siemens.com,
	dlaor@redhat.com, qemu-devel@nongnu.org,
	Avi Kivity <avi@redhat.com>
Subject: Re: [Qemu-devel] Re: [PATCH 08/11] QMP: Port balloon command
Date: Tue, 23 Jun 2009 13:59:58 -0300	[thread overview]
Message-ID: <20090623135958.660903e1@doriath> (raw)
In-Reply-To: <4A40DFCE.5050008@codemonkey.ws>

On Tue, 23 Jun 2009 08:59:42 -0500
Anthony Liguori <anthony@codemonkey.ws> wrote:

> 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.

 For me, this is one of the hardest aspects of the project.

 It is more general than unit conversion, the problem is: how should
commands output (specially multline) look like?

 I have talked with Eduardo about this, and I have chosen the simplest
approach, which is prefixing commands output by '='. That is, the
protocol doesn't change commands output, just adds prefixes.

 This approach has the advantage of making the protocol merge very
easy and I believe it will be less painful to maintain as well.

 On the other hand, the format of most commands are not good/meant
to be parsed, this gives the possibility of:

> > We also need a way to discover that the command is available:
> 
> I think we want to version each command too.

 making it quite complicated. :)

 If we go this way (of defining an output for each command or even
defining a version for each command) I fear we will take forever
to get in agreement and merge the whole series.

 Another related question is: should we port 100% of the command
set up front or can we merge small sets, defining a new version of
the protocol each time?

 What I would like to do for QMP V1 is:

1. Keep what this series is doing, that is, keep commands output
unchanged and only add prefixes (unit conversion is ok though)

2. Define a set of commands to be part of V1, and port them

 We can try to port the whole set as fast as we can (say, until
V3). Right after that, we could start improving commands output.

  parent reply	other threads:[~2009-06-23 17:00 UTC|newest]

Thread overview: 199+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1245730845.git.lcapitulino@redhat.com>
2009-06-23  4:28 ` [Qemu-devel] [PATCH 01/11] QMP: Introduce specification file Luiz Capitulino
2009-06-23  8:55   ` [Qemu-devel] " Avi Kivity
2009-06-23  9:57     ` Daniel P. Berrange
2009-06-23 10:08       ` Avi Kivity
2009-06-23 13:22       ` Luiz Capitulino
2009-06-23 13:31         ` Avi Kivity
2009-06-23 13:06     ` Luiz Capitulino
2009-06-23 13:10       ` Daniel P. Berrange
2009-06-23 17:12         ` Luiz Capitulino
2009-06-23 13:27       ` Avi Kivity
2009-06-23 17:15         ` Luiz Capitulino
2009-06-23 13:12     ` Anthony Liguori
2009-06-23 13:30       ` Avi Kivity
2009-06-23 13:34         ` Eduardo Habkost
2009-06-23 13:40         ` Anthony Liguori
2009-06-23 15:01           ` Avi Kivity
2009-06-23 15:47             ` Anthony Liguori
2009-06-23 16:02               ` Avi Kivity
2009-06-23 17:20       ` Luiz Capitulino
2009-06-23 14:45   ` [Qemu-devel] " Vincent Hanquez
2009-06-23 15:56     ` Avi Kivity
2009-06-23 15:56       ` Anthony Liguori
2009-06-23 16:04         ` Avi Kivity
2009-06-23 16:09           ` Anthony Liguori
2009-06-23 16:15             ` Avi Kivity
2009-06-23 18:32               ` Anthony Liguori
2009-06-23 18:47                 ` Avi Kivity
2009-06-23 19:00                   ` Anthony Liguori
2009-06-23 19:44                     ` Avi Kivity
2009-06-23 19:52                     ` Avi Kivity
2009-06-23 20:07                       ` Anthony Liguori
2009-06-23 20:13                         ` Avi Kivity
2009-06-23 22:02                           ` Anthony Liguori
2009-06-23 22:02                     ` Vincent Hanquez
2009-06-23 22:50                       ` Anthony Liguori
2009-06-24  1:01                         ` Vincent Hanquez
2009-06-24 11:55                           ` James
2009-06-24 12:09                             ` Daniel P. Berrange
2009-06-24 12:32                               ` James
2009-06-24 12:54                                 ` Daniel P. Berrange
2009-06-24 14:31                                   ` Stefano Stabellini
2009-06-24 12:46                           ` Anthony Liguori
2009-06-24 13:02                             ` Daniel P. Berrange
2009-06-24 13:21                               ` Avi Kivity
2009-06-24 13:09                             ` Avi Kivity
2009-06-24 16:22                               ` Jamie Lokier
2009-06-24 16:25                                 ` Avi Kivity
2009-06-24 18:52                                   ` Jamie Lokier
2009-06-24 17:39                                 ` Vincent Hanquez
2009-06-24 18:23                                   ` Filip Navara
2009-06-24 18:41                                     ` Jamie Lokier
2009-06-24 18:42                                     ` Vincent Hanquez
2009-06-24 18:55                                       ` Filip Navara
2009-06-24 18:56                                       ` Jamie Lokier
2009-06-24 13:34                             ` Ian Jackson
2009-06-24 16:09                               ` Jamie Lokier
2009-06-24 14:03                             ` Filip Navara
2009-06-25 19:30                               ` Luiz Capitulino
2009-06-24 14:06                             ` Vincent Hanquez
2009-06-24 14:41                             ` Stefano Stabellini
2009-06-24 14:56                             ` Chris Webb
2009-06-24 19:01                               ` Jamie Lokier
2009-06-24 15:57                             ` Filip Navara
2009-06-24 16:22                               ` Avi Kivity
2009-06-24 16:42                                 ` Filip Navara
2009-06-24 19:05                                 ` Jamie Lokier
2009-06-24 19:24                                   ` Filip Navara
2009-06-24 21:13                                     ` Jamie Lokier
2009-06-24 21:29                                       ` Filip Navara
2009-06-24 21:47                                         ` Jamie Lokier
2009-06-25 13:07                                       ` Stefano Stabellini
2009-06-25 14:55                                         ` Avi Kivity
2009-06-25 15:10                                           ` Anthony Liguori
2009-06-25 15:20                                             ` Avi Kivity
2009-06-25 17:04                                               ` Stefano Stabellini
2009-06-25 18:10                                                 ` Anthony Liguori
2009-06-25 19:03                                                   ` Daniel P. Berrange
2009-06-26  9:00                                                     ` Avi Kivity
2009-06-26  9:10                                                       ` Daniel P. Berrange
2009-06-26  9:16                                                         ` Avi Kivity
2009-06-26  9:44                                                           ` Daniel P. Berrange
2009-06-26 11:41                                                             ` Vincent Hanquez
2009-06-25 18:09                                               ` Anthony Liguori
2009-06-25 18:31                                                 ` Avi Kivity
2009-06-25 19:54                                                   ` Anthony Liguori
2009-06-26  9:12                                                     ` Avi Kivity
2009-06-26 13:21                                                       ` Anthony Liguori
2009-06-26 15:02                                                         ` Anthony Liguori
2009-06-26 17:36                                                           ` Filip Navara
2009-06-26 19:36                                                             ` Anthony Liguori
2009-06-26 20:25                                                               ` Filip Navara
2009-06-28 13:16                                                                 ` Avi Kivity
2009-06-28 17:30                                                                   ` Anthony Liguori
2009-06-28 17:36                                                                     ` Avi Kivity
2009-06-29  9:44                                                                     ` Stefano Stabellini
2009-06-29  9:50                                                                       ` Avi Kivity
2009-06-29 10:09                                                                         ` Stefano Stabellini
2009-06-27  7:03                                                               ` Filip Navara
2009-06-28 12:11                                                           ` Avi Kivity
2009-06-28 13:13                                                           ` Avi Kivity
2009-06-28 17:23                                                             ` Anthony Liguori
2009-06-28 17:34                                                               ` Avi Kivity
2009-06-29  0:42                                                                 ` Anthony Liguori
2009-06-29  6:04                                                                   ` Avi Kivity
2009-06-29  9:48                                                                     ` Stefano Stabellini
2009-06-29 20:23                                                                     ` Anthony Liguori
2009-06-30  5:37                                                                       ` Avi Kivity
2009-06-30 13:30                                                                         ` Anthony Liguori
2009-06-30 13:51                                                                           ` Stefano Stabellini
2009-06-30 13:52                                                                           ` Avi Kivity
2009-06-30 13:56                                                                             ` Anthony Liguori
2009-06-30 14:03                                                                               ` Luiz Capitulino
2009-06-30 16:05                                                                                 ` Avi Kivity
2009-06-30 18:21                                                                                   ` Anthony Liguori
2009-07-01  8:07                                                                                     ` Avi Kivity
2009-06-29 14:41                                                                   ` Stefano Stabellini
2009-06-29 14:56                                                                     ` Avi Kivity
2009-06-28 17:38                                                               ` Filip Navara
2009-06-26 11:36                                                     ` Vincent Hanquez
2009-06-24 16:00                     ` Jamie Lokier
2009-06-23 16:20             ` Avi Kivity
2009-06-23 17:59             ` Vincent Hanquez
2009-06-23 15:41   ` Blue Swirl
2009-06-23  4:28 ` [Qemu-devel] [PATCH 02/11] QMP: Introduce MONITOR_USE_CONTROL flag Luiz Capitulino
2009-06-23  4:28 ` [Qemu-devel] [PATCH 03/11] QMP: Introduce protocol print functions Luiz Capitulino
2009-06-23 13:45   ` Anthony Liguori
2009-06-23 13:53     ` Eduardo Habkost
2009-06-23  4:28 ` [Qemu-devel] [PATCH 04/11] QMP: Make monitor_handle_command() QMP aware Luiz Capitulino
2009-06-23 13:51   ` Anthony Liguori
2009-06-23 17:25     ` Luiz Capitulino
2009-06-23  4:29 ` [Qemu-devel] [PATCH 05/11] QMP: Introduce control mode chardev handling Luiz Capitulino
2009-06-23  4:29 ` [Qemu-devel] [PATCH 06/11] QMP: Introduce asynchronous events infrastructure Luiz Capitulino
2009-06-23  8:59   ` [Qemu-devel] " Jan Kiszka
2009-06-23 13:31     ` Luiz Capitulino
2009-06-23 10:08   ` Daniel P. Berrange
2009-06-23 10:11     ` Avi Kivity
2009-06-23 14:46     ` Paul Brook
2009-06-23 10:32   ` Daniel P. Berrange
2009-06-23 11:23     ` Avi Kivity
2009-06-23 13:36     ` Luiz Capitulino
2009-06-23 13:48       ` Eduardo Habkost
2009-06-23 13:51         ` Jan Kiszka
2009-06-23 16:34           ` Avi Kivity
2009-06-23 16:47           ` Daniel P. Berrange
2009-06-23  4:29 ` [Qemu-devel] [PATCH 07/11] QMP: Enable simple commands Luiz Capitulino
2009-06-23  4:29 ` [Qemu-devel] [PATCH 08/11] QMP: Port balloon command Luiz Capitulino
2009-06-23  9:42   ` [Qemu-devel] " Avi Kivity
2009-06-23 13:59     ` Anthony Liguori
2009-06-23 16:36       ` Avi Kivity
2009-06-23 16:58         ` Anthony Liguori
2009-06-23 16:59       ` Luiz Capitulino [this message]
2009-06-23 18:38         ` Anthony Liguori
2009-06-25 11:27           ` Dor Laor
2009-06-25 19:11             ` Luiz Capitulino
2009-06-26  9:21               ` Avi Kivity
2009-06-26  9:42                 ` Daniel P. Berrange
2009-06-26 11:15                   ` Avi Kivity
2009-06-27 15:58                   ` Luiz Capitulino
2009-06-28 15:52                     ` Avi Kivity
2009-06-28 16:30                       ` Blue Swirl
2009-06-28 17:23                       ` Filip Navara
2009-06-28 17:43                         ` Avi Kivity
2009-06-28 17:51                         ` Blue Swirl
2009-06-28 18:36                           ` Avi Kivity
2009-06-28 22:11                           ` Jamie Lokier
2009-06-25 19:59             ` Anthony Liguori
2009-06-23  4:29 ` [Qemu-devel] [PATCH 09/11] QMP: Port 'info blockstats' command Luiz Capitulino
2009-06-23  9:43   ` [Qemu-devel] " Avi Kivity
2009-06-23  9:59     ` Jan Kiszka
2009-06-23 10:09       ` Avi Kivity
2009-06-23 10:10         ` Jan Kiszka
2009-06-23 14:01   ` [Qemu-devel] " Anthony Liguori
2009-06-23  4:29 ` [Qemu-devel] [PATCH 10/11] QMP: Introduce basic events Luiz Capitulino
2009-06-23  9:46   ` [Qemu-devel] " Avi Kivity
2009-06-23 17:07     ` Luiz Capitulino
2009-06-23 10:06   ` Daniel P. Berrange
2009-06-23  4:30 ` [Qemu-devel] [PATCH 11/11] QMP: Command-line flag to enable control mode Luiz Capitulino
2009-06-23  9:03   ` [Qemu-devel] " Jan Kiszka
2009-06-23 10:04     ` Daniel P. Berrange
2009-06-23 10:11       ` Jan Kiszka
2009-06-23 10:17         ` Avi Kivity
2009-06-23 10:54           ` Jan Kiszka
2009-06-23 11:28             ` Avi Kivity
2009-06-23 11:44               ` Jan Kiszka
2009-06-23 11:51                 ` Avi Kivity
2009-06-23 11:53                   ` Jan Kiszka
2009-06-23 12:01                     ` Avi Kivity
2009-06-23 12:39                       ` Jan Kiszka
2009-06-23 12:46                         ` Avi Kivity
2009-06-23 12:48                         ` Avi Kivity
2009-06-23 11:54                   ` Daniel P. Berrange
2009-06-23 11:48               ` Daniel P. Berrange
2009-06-23 12:25                 ` Avi Kivity
2009-06-23 14:06           ` Anthony Liguori
2009-06-23 10:19         ` Daniel P. Berrange
2009-06-23 11:13           ` Jan Kiszka
2009-06-23 13:59     ` Luiz Capitulino
2009-06-23 14:06       ` Jan Kiszka
2009-06-23 17:27         ` Luiz Capitulino

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090623135958.660903e1@doriath \
    --to=lcapitulino@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=anthony@codemonkey.ws \
    --cc=avi@redhat.com \
    --cc=dlaor@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=jan.kiszka@siemens.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).