qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: mdroth <mdroth@linux.vnet.ibm.com>
To: Luiz Capitulino <lcapitulino@redhat.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"aliguori@us.ibm.com" <aliguori@us.ibm.com>,
	Dietmar Maurer <dietmar@proxmox.com>,
	"agl@us.ibm.com" <agl@us.ibm.com>
Subject: Re: [Qemu-devel] [PATCH 0/3] re-enable balloon stats
Date: Tue, 11 Dec 2012 16:26:23 -0600	[thread overview]
Message-ID: <20121211222623.GI30686@vm> (raw)
In-Reply-To: <20121211162840.4b01701e@doriath.home>

On Tue, Dec 11, 2012 at 04:28:40PM -0200, Luiz Capitulino wrote:
> On Tue, 11 Dec 2012 11:38:08 -0600
> mdroth <mdroth@linux.vnet.ibm.com> wrote:
> 
> > On Tue, Dec 11, 2012 at 03:14:02PM +0000, Dietmar Maurer wrote:
> > > > > > I'm not sure I like this for two reasons. First, there will be cases
> > > > > > where the user doesn't want this to be enabled. Second, we'll be
> > > > > > forcing an interval on users.
> > > > >
> > > > > So when should we set the stats-polling-interval? I first thought I
> > > > > simply set that at VM start, but that triggers an error:
> > > > >
> > > > > "guest doesn't support balloon stats"
> > > > >
> > > > > because the balloon driver is not loaded.
> > > > 
> > > > Yes, it's required to have the balloon driver loaded. The stats are reported by
> > > > it.
> > > 
> > > That does not really answers my question. So you think the management
> > > framework should start the VM, and then wait until the balloon driver is
> > > loaded? That sound very clumsy to me.
> > > 
> > > I mean, I just want to set the polling interval. Why does that need the balloon drive loaded 
> > > inside the guest (polling is done by the host)?
> > 
> > I agree. Should lack of a balloon module disable the timer
> > completely, or just silently fail? Management can always reference
> > stats-last-update to check that stats are being reported properly. -1 would
> > mean driver was never loaded, longer update intervals might mean guest
> > was rebooted/suspended/etc, but in both cases it makes sense that the
> > timer still try to fetch stats, and the determination of what stats are
> > valid/invalid be left to management.
> 
> I could move the check for the stats feature bit from the function that
> enables polling to the timer callback. This would solve Dietmar's use-case,
> but it would silently fail if the feature is never negotiated (as you said
> above).
> 
> > Alternatively, we can hook into the feature negotiation path and
> > defer the actual timer start until the required feature is negotiated,
> 
> That's also possible, and helps not wasting resources.
> 
> > and disable it (temporarilly or permanently based on guest behavior)
> > somewhere in the reset path). I'm not sure this will keep it from
> > running during hibernate/sleep...maybe hook into runstate changes?
> 
> Then it starts to get somewhat complicated.
> 

Agreed...that's only if we want to go to extremes to avoid running the
timer unecessarily, but probably not worth it.

I like your idea of just having the timer callback fail silently if the
feature isn't enabled.

And personally, I think just having a stale value for stats-last-update
is sufficient for error checking, but we can squirrel away an error in
a stats-last-error field if we want something more descriptive for
clients, and just wipe it out on the next successful update. Not sure
whether we should clear the stats upon error or not, I think it might
actually be useful to leave them. If the guest crashed because we
ballooned away too much memory or something for instance we'd be able
to see the last value we logged.

  parent reply	other threads:[~2012-12-11 22:30 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-10 19:36 [Qemu-devel] [PATCH 0/3] re-enable balloon stats Luiz Capitulino
2012-12-10 19:36 ` [Qemu-devel] [PATCH 1/3] virtio-balloon: drop old stats code Luiz Capitulino
2012-12-10 19:36 ` [Qemu-devel] [PATCH 2/3] virtio-balloon: re-enable balloon stats Luiz Capitulino
2012-12-10 19:36 ` [Qemu-devel] [PATCH 3/3] docs: document virtio-balloon stats Luiz Capitulino
2012-12-11  5:12 ` [Qemu-devel] [PATCH 0/3] re-enable balloon stats Dietmar Maurer
2012-12-11 11:45   ` Luiz Capitulino
2012-12-11 12:05     ` Dietmar Maurer
2012-12-11 12:10       ` Luiz Capitulino
2012-12-11 12:29     ` Dietmar Maurer
2012-12-11 12:59       ` Luiz Capitulino
2012-12-11 15:14         ` Dietmar Maurer
2012-12-11 17:38           ` mdroth
2012-12-11 18:28             ` Luiz Capitulino
2012-12-11 18:30               ` Luiz Capitulino
2012-12-11 19:07               ` Dietmar Maurer
2012-12-11 19:23                 ` Luiz Capitulino
2012-12-11 19:39                   ` Dietmar Maurer
2012-12-11 19:41                     ` Luiz Capitulino
2012-12-12 13:17                       ` Dietmar Maurer
2012-12-12 13:29                         ` Luiz Capitulino
2012-12-12 13:36                           ` Dietmar Maurer
2012-12-12 13:40                             ` Luiz Capitulino
2012-12-12 13:45                               ` Dietmar Maurer
2012-12-13 12:41                                 ` Luiz Capitulino
2012-12-11 22:26               ` mdroth [this message]
2012-12-12  5:56                 ` Dietmar Maurer

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=20121211222623.GI30686@vm \
    --to=mdroth@linux.vnet.ibm.com \
    --cc=agl@us.ibm.com \
    --cc=aliguori@us.ibm.com \
    --cc=dietmar@proxmox.com \
    --cc=lcapitulino@redhat.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).