qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Luiz Capitulino <lcapitulino@redhat.com>
To: Michael Roth <mdroth@linux.vnet.ibm.com>
Cc: aliguori@us.ibm.com, armbru@redhat.com, qemu-devel@nongnu.org,
	agl@us.ibm.com, amit.shah@redhat.com, eblake@redhat.com
Subject: Re: [Qemu-devel] [RFC 0/5]: QMP: add balloon-get-memory-stats command
Date: Thu, 19 Jan 2012 14:58:12 -0200	[thread overview]
Message-ID: <20120119145812.4f6079b4@doriath> (raw)
In-Reply-To: <4F184837.3080004@linux.vnet.ibm.com>

On Thu, 19 Jan 2012 10:43:35 -0600
Michael Roth <mdroth@linux.vnet.ibm.com> wrote:

> On 01/19/2012 09:56 AM, Luiz Capitulino wrote:
> > Long ago, commit 625a5be added the guest provided memory statistics to
> > the query-balloon command. Unfortunately, it also introduced a severe
> > bug: query-balloon would hang if the guest didn't respond. This, in turn,
> > would also cause a hang in libvirt.
> >
> > Because of that, we decided to disable the guest memory stats feature
> > (commit 11724ff).
> >
> > As we decided to let commands implement ad-hoc async mechanisms until we
> > get a proper way to do it, I decided to try to re-enable that feature.
> >
> > My idea is to have 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 05/05 for full details).
> >
> > I'm not sure if that approach is good for libvirt though, so it would be
> > very helpful to get their input (Eric, I'm CC'ing you here, but feel free
> > to route this to someone else).
> >
> > Another interesting point is that, there's another way of doing this and
> > it's using qemu-ga instead. That's, qemu-ga could read that information
> > from proc and return it. This is easier&  simpler, as it doesn't involve
> > guest communication. We also could return a lot more information if needed.
> > The only disadvantage I can see is the dependency on qemu-ga...
> 
> A nice plus with this is we retroactively get support for a wide range 
> of existing guest types that we wouldn't realistically expect to have a 
> qemu-ga package, and I think there's even balloon stats for Windows 
> guests as well. Event-based updates also lend themselves nicely to 
> things like qemu-centric UI integration.
> 
> Memory stats is one of the proposed use-cases of qemu-ga, but I don't 
> see these as necessarily being in conflict. We can extend the statistics 
> collection quite a bit more with an agent approach, but it's nice to 
> have some assurance that if you can balloon a guest, you can at the very 
> least get at the bare minimum information you need to make reasonable 
> decisions about ballooning.

That makes sense, we could have both.

> 
> >
> >   QMP/qmp-events.txt  |   28 ++++++++++++++++++++++++++++
> >   balloon.c           |   47 +++++++++++++++++++++++++++++++++++++----------
> >   balloon.h           |    7 ++++---
> >   hmp.c               |   25 +------------------------
> >   hw/virtio-balloon.c |   39 +++++++++++++++++++++++++++------------
> >   monitor.c           |    3 +++
> >   monitor.h           |    1 +
> >   qapi-schema.json    |   42 ++++++++++++++++++++++--------------------
> >   qmp-commands.hx     |    6 ++++++
> >   9 files changed, 129 insertions(+), 69 deletions(-)
> >
> 

  reply	other threads:[~2012-01-19 16:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-19 15:56 [Qemu-devel] [RFC 0/5]: QMP: add balloon-get-memory-stats command Luiz Capitulino
2012-01-19 15:56 ` [Qemu-devel] [PATCH 1/5] balloon: qmp_balloon(): Use error_set() Luiz Capitulino
2012-01-19 15:56 ` [Qemu-devel] [PATCH 2/5] balloon: Drop unused include Luiz Capitulino
2012-01-19 15:56 ` [Qemu-devel] [PATCH 3/5] balloon: Drop old stats interface Luiz Capitulino
2012-01-19 15:56 ` [Qemu-devel] [PATCH 4/5] balloon: Rename QEMUBalloonStatus to QEMUBalloonInfo Luiz Capitulino
2012-01-19 15:56 ` [Qemu-devel] [PATCH 5/5] qmp: add balloon-get-memory-stats & event Luiz Capitulino
2012-01-19 16:43 ` [Qemu-devel] [RFC 0/5]: QMP: add balloon-get-memory-stats command Michael Roth
2012-01-19 16:58   ` Luiz Capitulino [this message]
2012-01-19 17:15 ` Eric Blake
2012-01-20 12:02   ` Luiz Capitulino
2012-01-19 21:50 ` Adam Litke
2012-01-20 12:06   ` 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=20120119145812.4f6079b4@doriath \
    --to=lcapitulino@redhat.com \
    --cc=agl@us.ibm.com \
    --cc=aliguori@us.ibm.com \
    --cc=amit.shah@redhat.com \
    --cc=armbru@redhat.com \
    --cc=eblake@redhat.com \
    --cc=mdroth@linux.vnet.ibm.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).