All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Denis V. Lunev" <den@openvz.org>
Cc: "Denis V. Lunev" <den@openvz.org>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	qemu-devel@nongnu.org, Igor Redko <redkoi@virtuozzo.com>
Subject: [Qemu-devel] [PATCH 2/2] virtio-balloon: add 'available' counter
Date: Wed, 24 Feb 2016 10:50:48 +0300	[thread overview]
Message-ID: <1456300248-31944-3-git-send-email-den@openvz.org> (raw)
In-Reply-To: <1456300248-31944-1-git-send-email-den@openvz.org>

The patch for the kernel part is in linux-next already:
commit ac88e7c908b920866e529862f2b2f0129b254ab2
    Author: Igor Redko <redkoi@virtuozzo.com>
    Date:   Thu Feb 18 09:23:01 2016 +1100

    virtio_balloon: export 'available' memory to balloon statistics

    Add a new field, VIRTIO_BALLOON_S_AVAIL, to virtio_balloon memory
    statistics protocol, corresponding to 'Available' in /proc/meminfo.

Signed-off-by: Denis V. Lunev <den@openvz.org>
CC: Igor Redko <redkoi@virtuozzo.com>
CC: Michael S. Tsirkin <mst@redhat.com>
---
 hw/virtio/virtio-balloon.c                      | 1 +
 include/standard-headers/linux/virtio_balloon.h | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c
index 6629145..3193f44 100644
--- a/hw/virtio/virtio-balloon.c
+++ b/hw/virtio/virtio-balloon.c
@@ -53,6 +53,7 @@ static const char *balloon_stat_names[] = {
    [VIRTIO_BALLOON_S_MINFLT] = "stat-minor-faults",
    [VIRTIO_BALLOON_S_MEMFREE] = "stat-free-memory",
    [VIRTIO_BALLOON_S_MEMTOT] = "stat-total-memory",
+   [VIRTIO_BALLOON_S_AVAIL] = "stat-available-memory",
    [VIRTIO_BALLOON_S_NR] = NULL
 };
 
diff --git a/include/standard-headers/linux/virtio_balloon.h b/include/standard-headers/linux/virtio_balloon.h
index 2e2a6dc..0df7c2e 100644
--- a/include/standard-headers/linux/virtio_balloon.h
+++ b/include/standard-headers/linux/virtio_balloon.h
@@ -51,7 +51,8 @@ struct virtio_balloon_config {
 #define VIRTIO_BALLOON_S_MINFLT   3   /* Number of minor faults */
 #define VIRTIO_BALLOON_S_MEMFREE  4   /* Total amount of free memory */
 #define VIRTIO_BALLOON_S_MEMTOT   5   /* Total amount of memory */
-#define VIRTIO_BALLOON_S_NR       6
+#define VIRTIO_BALLOON_S_AVAIL    6   /* Amount of available memory in guest */
+#define VIRTIO_BALLOON_S_NR       7
 
 /*
  * Memory statistics structure.
-- 
2.1.4

  parent reply	other threads:[~2016-02-24  7:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-24  7:50 [Qemu-devel] [PATCH v3 0/2] virtio-balloon: improve balloon statistics Denis V. Lunev
2016-02-24  7:50 ` [Qemu-devel] [PATCH 1/2] virtio-balloon: export all " Denis V. Lunev
2016-02-24  7:50 ` Denis V. Lunev [this message]
2016-02-24 14:34 ` [Qemu-devel] [PATCH v3 0/2] virtio-balloon: improve " Michael S. Tsirkin
2016-02-24 15:33   ` Denis V. Lunev
2016-02-24 15:39     ` Michael S. Tsirkin
2016-02-26 17:58       ` Denis V. Lunev
2016-03-01 13:44 ` Denis V. Lunev
2016-03-01 17:16   ` Michael S. Tsirkin
  -- strict thread matches above, loose matches on Subject: below --
2016-02-23 14:59 [Qemu-devel] [PATCH v2 " Denis V. Lunev
2016-02-23 14:59 ` [Qemu-devel] [PATCH 2/2] virtio-balloon: add 'available' counter Denis V. Lunev
2016-02-20  7:54 [Qemu-devel] [PATCH 0/2] virtio-balloon: improve balloon statistics Denis V. Lunev
2016-02-20  7:54 ` [Qemu-devel] [PATCH 2/2] virtio-balloon: add 'available' counter Denis V. Lunev
2016-02-22 21:28   ` 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=1456300248-31944-3-git-send-email-den@openvz.org \
    --to=den@openvz.org \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=redkoi@virtuozzo.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.