qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Re: [PATCH 08/11] QMP: Port balloon command


From: Anthony Liguori
Subject: Re: [Qemu-devel] Re: [PATCH 08/11] QMP: Port balloon command
Date: Tue, 23 Jun 2009 13:38:45 -0500
User-agent: Thunderbird 2.0.0.21 (X11/20090320)

Luiz Capitulino wrote:
On Tue, 23 Jun 2009 08:59:42 -0500
Anthony Liguori <address@hidden> wrote:

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.

I'm not saying you should change command output. Most commands follow a similar format quite intentionally. That's:

<header>: <param>=<value>[,<param>=<value>[...]]

I'm just suggesting that you codify that instead of leaving it open coded everywhere. Nothing more than that.

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

FWIW, you could introduce monitor_printf_list() as your first patch.

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.

I wanted to respond to the top level, but here's what I see as the potential merge plan:

1) Make all commands return a value
2) Add a mechanism to mark commands as being "structured"
3) Get the structured printfs in order.
4) Merge

I won't want QMP to be exposed as a usable interface until all commands are converted. This means holding off on the last patch I think. I don't think we'll get QMP for 0.11. I think it's likely going to be a 0.12 feature. However, I'd like to start merging this series as soon as humanly possible. I think it's already pretty close.

--
Regards,

Anthony Liguori





reply via email to

[Prev in Thread] Current Thread [Next in Thread]