From: Adam Litke <agl@us.ibm.com>
To: Eduardo Habkost <ehabkost@redhat.com>
Cc: Markus Armbruster <armbru@redhat.com>,
qemu list <qemu-devel@nongnu.org>,
Amit Shah <amit.shah@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Luiz Capitulino <lcapitulino@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] Disable virtio-balloon memory stats interface
Date: Tue, 14 Sep 2010 11:01:42 -0500 [thread overview]
Message-ID: <1284480102.2232.19.camel@aglitke> (raw)
In-Reply-To: <20100914140932.GA12878@blackpad.lan.raisama.net>
Ok, I can see how this will work better for the migration case.
Acked-by: Adam Litke <agl@us.ibm.com>
On Tue, 2010-09-14 at 11:09 -0300, Eduardo Habkost wrote:
> This field is guest-visible, won't this cause problems on migration?
>
> Isn't it better to disable it on the "info balloon" side, so the guest
> knows that the host may start requesting stat info eventually? I suggest
> doing this:
>
> ---
> diff --git a/hw/virtio-balloon.c b/hw/virtio-balloon.c
> index 1e4dfdd..92e9057 100644
> --- a/hw/virtio-balloon.c
> +++ b/hw/virtio-balloon.c
> @@ -30,6 +30,10 @@
> #include <sys/mman.h>
> #endif
>
> +/* Disable guest-provided stats by now (bz#623903, bz#626544) */
> +#define ENABLE_GUEST_STATS 0
> +
> +
> typedef struct VirtIOBalloon
> {
> VirtIODevice vdev;
> @@ -84,12 +88,14 @@ static QObject *get_stats_qobject(VirtIOBalloon *dev)
> VIRTIO_BALLOON_PFN_SHIFT);
>
> stat_put(dict, "actual", actual);
> +#if ENABLE_GUEST_STATS
> stat_put(dict, "mem_swapped_in", dev->stats[VIRTIO_BALLOON_S_SWAP_IN]);
> stat_put(dict, "mem_swapped_out", dev->stats[VIRTIO_BALLOON_S_SWAP_OUT]);
> stat_put(dict, "major_page_faults", dev->stats[VIRTIO_BALLOON_S_MAJFLT]);
> stat_put(dict, "minor_page_faults", dev->stats[VIRTIO_BALLOON_S_MINFLT]);
> stat_put(dict, "free_mem", dev->stats[VIRTIO_BALLOON_S_MEMFREE]);
> stat_put(dict, "total_mem", dev->stats[VIRTIO_BALLOON_S_MEMTOT]);
> +#endif
>
> return QOBJECT(dict);
> }
> @@ -215,7 +221,7 @@ static void virtio_balloon_to_target(void *opaque, ram_addr_t target,
> }
> dev->stats_callback = cb;
> dev->stats_opaque_callback_data = cb_data;
> - if (dev->vdev.guest_features & (1 << VIRTIO_BALLOON_F_STATS_VQ)) {
> + if (ENABLE_GUEST_STATS && (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);
> } else {
>
--
Thanks,
Adam
next prev parent reply other threads:[~2010-09-14 16:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-08 14:21 [Qemu-devel] [PATCH] Disable virtio-balloon memory stats interface Adam Litke
2010-09-14 14:09 ` Eduardo Habkost
2010-09-14 14:24 ` Adam Litke
2010-09-14 14:41 ` Eduardo Habkost
2010-09-14 15:42 ` Eduardo Habkost
2010-09-14 15:46 ` Luiz Capitulino
2010-09-14 15:59 ` Adam Litke
2010-09-14 16:33 ` Luiz Capitulino
2010-09-14 16:01 ` Adam Litke [this message]
-- strict thread matches above, loose matches on Subject: below --
2010-08-27 5:27 [Qemu-devel] [PATCH v3 0/3] virtio-balloon: Don't wait indefinitely for guest response Amit Shah
2010-08-27 5:27 ` [Qemu-devel] [PATCH v3 2/3] qerror: Add a new MACHINE_STOPPED error message Amit Shah
2010-08-27 9:29 ` [Qemu-devel] " Daniel P. Berrange
2010-08-27 12:39 ` Anthony Liguori
2010-08-28 0:52 ` Amit Shah
2010-08-30 8:30 ` Markus Armbruster
2010-08-30 13:06 ` Anthony Liguori
2010-08-30 15:01 ` Markus Armbruster
2010-08-30 19:17 ` [Qemu-devel] [PATCH] Disable virtio-balloon memory stats interface Adam Litke
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=1284480102.2232.19.camel@aglitke \
--to=agl@us.ibm.com \
--cc=amit.shah@redhat.com \
--cc=armbru@redhat.com \
--cc=ehabkost@redhat.com \
--cc=lcapitulino@redhat.com \
--cc=pbonzini@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).