From: Luiz Capitulino <lcapitulino@redhat.com>
To: Dietmar Maurer <dietmar@proxmox.com>
Cc: "mdroth@linux.vnet.ibm.com" <mdroth@linux.vnet.ibm.com>,
"aliguori@us.ibm.com" <aliguori@us.ibm.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"agl@us.ibm.com" <agl@us.ibm.com>
Subject: Re: [Qemu-devel] [PATCH 1/3] balloon: drop old stats code & API
Date: Mon, 17 Dec 2012 10:33:57 -0200 [thread overview]
Message-ID: <20121217103357.1216a46f@doriath.home> (raw)
In-Reply-To: <24E144B8C0207547AD09C467A8259F75578B4B5E@lisa.maurer-it.com>
On Mon, 17 Dec 2012 12:23:59 +0000
Dietmar Maurer <dietmar@proxmox.com> wrote:
> > > I don't really see any conflicts here?
> >
> > query-balloon resets all stats to -1. So, if it's issued after the stats have been
> > polled all values are lost.
>
> I can't see that in the code. I also tested with my patch, and it does not reset
> any stats. So I can't see that conflict?
>
> There is no code to reset stats inside virtio_balloon_stat()
static void virtio_balloon_stat(void *opaque, BalloonInfo *info)
{
VirtIOBalloon *dev = opaque;
#if 0
/* Disable guest-provided stats for now. For more details please check:
* https://bugzilla.redhat.com/show_bug.cgi?id=623903
*
* If you do enable it (which is probably not going to happen as we
* need a new command for it), remember that you also need to fill the
* appropriate members of the BalloonInfo structure so that the stats
* are returned to the client.
*/
if (dev->vdev.guest_features & (1 << VIRTIO_BALLOON_F_STATS_VQ)) {
virtqueue_push(dev->svq, &dev->stats_vq_elem, dev->stats_vq_offset);
virtio_notify(&dev->vdev, dev->svq);
return;
}
#endif
/* Stats are not supported. Clear out any stale values that might
* have been set by a more featureful guest kernel.
*/
reset_stats(dev); <<<<========================================================
^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^
info->actual = ram_size - ((uint64_t) dev->actual <<
VIRTIO_BALLOON_PFN_SHIFT);
}
>
> > > > It's important to note that the QMP and HMP interfaces are also
> > > > dropped by this commit. That shouldn't be a problem though, because:
> > > >
> > > > 1. All QMP fields are optional
> > > > 2. This has never been really used
> > >
> > > Why don't we simply implement the missing parts - it's just a few lines of
> > code.
> >
> > For the reasons explained in my last email. We'd need at least two
> > commands, one for to enable polling/set time interval and also query-
> > balloon-stats, as adding this to query-balloon would mix semantics (ie. one
> > field is always there and the others have polling semantics).
>
> Yes, we need 2 commands - and what is the problem?
The problem is adding new commands when that's not required. With QOM
everything can be done with existing commands.
next prev parent reply other threads:[~2012-12-17 12:34 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-14 15:49 [Qemu-devel] [PATCH v2 0/3] re-enable balloon stats Luiz Capitulino
2012-12-14 15:49 ` [Qemu-devel] [PATCH 1/3] balloon: drop old stats code & API Luiz Capitulino
2012-12-17 10:13 ` Dietmar Maurer
2012-12-17 11:57 ` Luiz Capitulino
2012-12-17 12:23 ` Dietmar Maurer
2012-12-17 12:33 ` Luiz Capitulino [this message]
2012-12-17 12:36 ` Dietmar Maurer
2012-12-17 12:39 ` Luiz Capitulino
2012-12-18 21:34 ` Eric Blake
2012-12-19 5:18 ` Dietmar Maurer
2012-12-19 11:27 ` Luiz Capitulino
2012-12-20 18:36 ` Eric Blake
2012-12-14 15:49 ` [Qemu-devel] [PATCH 2/3] balloon: re-enable balloon stats Luiz Capitulino
2012-12-14 15:49 ` [Qemu-devel] [PATCH 3/3] docs: document virtio-balloon stats Luiz Capitulino
2012-12-15 7:19 ` [Qemu-devel] [PATCH v2 0/3] re-enable balloon stats Dietmar Maurer
2012-12-17 11:52 ` Luiz Capitulino
2012-12-17 12:17 ` Dietmar Maurer
2012-12-17 12:22 ` Luiz Capitulino
2012-12-17 12:26 ` Dietmar Maurer
2012-12-17 12:38 ` Luiz Capitulino
2012-12-17 12:39 ` Dietmar Maurer
-- strict thread matches above, loose matches on Subject: below --
2013-01-18 19:29 [Qemu-devel] [PATCH v3 " Luiz Capitulino
2013-01-18 19:29 ` [Qemu-devel] [PATCH 1/3] balloon: drop old stats code & API Luiz Capitulino
2013-01-18 20:01 ` Eric Blake
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=20121217103357.1216a46f@doriath.home \
--to=lcapitulino@redhat.com \
--cc=agl@us.ibm.com \
--cc=aliguori@us.ibm.com \
--cc=dietmar@proxmox.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).