qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/6] QMP: add balloon-get-memory-stats command
@ 2012-02-08 20:30 Luiz Capitulino
  2012-02-08 20:30 ` [Qemu-devel] [PATCH 1/6] balloon: qmp_balloon(): Use error_set() Luiz Capitulino
                   ` (5 more replies)
  0 siblings, 6 replies; 21+ messages in thread
From: Luiz Capitulino @ 2012-02-08 20:30 UTC (permalink / raw)
  To: qemu-devel; +Cc: eblake, aliguori, armbru, agl

This series re-enables the balloon memory statistics feature disabled
long ago by commit 11724ff.

The feature has been disabled because it added a severe bug: query-balloon
would hang if the guest didn't respond. This, in turn, would also cause a
hang in libvirt.

To avoid that bug, the solution implemented in this series uses a command
and an event. The command gets the process started by sending a request to
guest and returns. Later, when the guest makes the memory stats info
available, it's sent to the client by means of an QMP event (please, take a
look at patch 6/6 for full details).

This series has an issue though: it lacks HMP support. The reason for this
is that there's no way to wait for an event in HMP. There are two ways to
solve this:

 1. We wait to have support for events in the QAPI. This way it will be
    possible to wait for events from HMP

 2. Add a query-balloon-memory-stats command which polls for the guest
    response (and immediatelly returns if the guest response is not
    available)

I'm going on only with the event for now, as this is slightly simpler.

 QMP/qmp-events.txt  |   36 ++++++++++++++++++++++++
 balloon.c           |   61 +++++++++++++++++++++++++++++++---------
 balloon.h           |    7 +++--
 hmp.c               |   25 +----------------
 hw/virtio-balloon.c |   76 ++++++++++++++++++++++++++++++++++-----------------
 monitor.c           |    2 +
 monitor.h           |    1 +
 qapi-schema.json    |   42 +++++++++++++++-------------
 qmp-commands.hx     |    5 +++
 9 files changed, 169 insertions(+), 86 deletions(-)

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2012-02-22 20:28 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-08 20:30 [Qemu-devel] [PATCH 0/6] QMP: add balloon-get-memory-stats command Luiz Capitulino
2012-02-08 20:30 ` [Qemu-devel] [PATCH 1/6] balloon: qmp_balloon(): Use error_set() Luiz Capitulino
2012-02-08 20:30 ` [Qemu-devel] [PATCH 2/6] balloon: Drop unused include Luiz Capitulino
2012-02-08 20:30 ` [Qemu-devel] [PATCH 3/6] balloon: Rename QEMUBalloonStatus to QEMUBalloonInfo Luiz Capitulino
2012-02-08 20:30 ` [Qemu-devel] [PATCH 4/6] balloon: Refactor kvm sync mmu check Luiz Capitulino
2012-02-08 20:30 ` [Qemu-devel] [PATCH 5/6] balloon: Drop old stats interface Luiz Capitulino
2012-02-08 20:30 ` [Qemu-devel] [PATCH 6/6] qmp: add balloon-get-memory-stats & event Luiz Capitulino
2012-02-09 19:26   ` Adam Litke
2012-02-10 17:11     ` Luiz Capitulino
2012-02-17 16:55   ` Anthony Liguori
2012-02-17 17:09     ` Michael Roth
2012-02-17 20:07       ` Anthony Liguori
2012-02-17 21:38         ` Michael Roth
2012-02-17 17:16     ` Luiz Capitulino
2012-02-17 21:51       ` Michael Roth
2012-02-22 12:48         ` Luiz Capitulino
2012-02-22 15:05           ` Michael Roth
2012-02-22 16:09             ` Luiz Capitulino
2012-02-22 16:54               ` Michael Roth
2012-02-22 19:44                 ` Luiz Capitulino
2012-02-22 20:27                   ` Michael Roth

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