[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 08/53] virtio-balloon: add 'available' counter
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 08/53] virtio-balloon: add 'available' counter |
Date: |
Fri, 11 Mar 2016 17:07:54 +0200 |
From: "Denis V. Lunev" <address@hidden>
The patch for the kernel part is in linux-next already:
commit ac88e7c908b920866e529862f2b2f0129b254ab2
Author: Igor Redko <address@hidden>
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 <address@hidden>
CC: Igor Redko <address@hidden>
CC: Michael S. Tsirkin <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
include/standard-headers/linux/virtio_balloon.h | 3 ++-
hw/virtio/virtio-balloon.c | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
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.
diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c
index e97d403..22ad25c 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
};
--
MST
- [Qemu-devel] [PULL 00/53] vhost, virtio, pci, pc, acpi, Michael S. Tsirkin, 2016/03/11
- [Qemu-devel] [PULL 01/53] acpi: add aml_create_field(), Michael S. Tsirkin, 2016/03/11
- [Qemu-devel] [PULL 02/53] acpi: add aml_concatenate(), Michael S. Tsirkin, 2016/03/11
- [Qemu-devel] [PULL 03/53] acpi: allow using object as offset for OperationRegion, Michael S. Tsirkin, 2016/03/11
- [Qemu-devel] [PULL 04/53] acpi: add build_append_named_dword, returning an offset in buffer, Michael S. Tsirkin, 2016/03/11
- [Qemu-devel] [PULL 06/53] hw/virtio: fix double use of a virtio flag, Michael S. Tsirkin, 2016/03/11
- [Qemu-devel] [PULL 07/53] hw/virtio: group virtio flags into an enum, Michael S. Tsirkin, 2016/03/11
- [Qemu-devel] [PULL 05/53] balloon: fix segfault and harden the stats queue, Michael S. Tsirkin, 2016/03/11
- [Qemu-devel] [PULL 08/53] virtio-balloon: add 'available' counter,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL 11/53] i386/acpi: make floppy controller object dynamic, Michael S. Tsirkin, 2016/03/11
- [Qemu-devel] [PULL 10/53] pc-dimm: fix error handling in pc_dimm_check_memdev_is_busy(), Michael S. Tsirkin, 2016/03/11
- [Qemu-devel] [PULL 09/53] vhost-user: verify that number of queues is less than MAX_QUEUE_NUM, Michael S. Tsirkin, 2016/03/11
- [Qemu-devel] [PULL 12/53] i386: expose floppy drive CMOS type, Michael S. Tsirkin, 2016/03/11
- [Qemu-devel] [PULL 14/53] i386: populate floppy drive information in DSDT, Michael S. Tsirkin, 2016/03/11
- [Qemu-devel] [PULL 13/53] fdc: add function to determine drive chs limits, Michael S. Tsirkin, 2016/03/11
- [Qemu-devel] [PULL 15/53] i386: update expected DSDT, Michael S. Tsirkin, 2016/03/11
- [Qemu-devel] [PULL 16/53] virtio-pci: call pci reset variant when guest requests reset., Michael S. Tsirkin, 2016/03/11