virtio-balloon: include statistics of disk/file caches
authorTomáš Golembiovský <tgolembi@redhat.com>
Tue, 5 Dec 2017 12:14:46 +0000 (13:14 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 13 Feb 2018 16:29:35 +0000 (18:29 +0200)
Signed-off-by: Tomáš Golembiovský <tgolembi@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/virtio/virtio-balloon.c
include/standard-headers/linux/virtio_balloon.h

index f2104bfcef22e65823305150ea3dd2fdbdad2f45..179c8f5768c41466035f92c1b1cbf06662a75054 100644 (file)
@@ -50,6 +50,7 @@ static const char *balloon_stat_names[] = {
    [VIRTIO_BALLOON_S_MEMFREE] = "stat-free-memory",
    [VIRTIO_BALLOON_S_MEMTOT] = "stat-total-memory",
    [VIRTIO_BALLOON_S_AVAIL] = "stat-available-memory",
+   [VIRTIO_BALLOON_S_CACHES] = "stat-disk-caches",
    [VIRTIO_BALLOON_S_NR] = NULL
 };
 
index 9d06ccd0666bcdd3207bea5be21cc844e6611578..7b0a41b8fc5aae520d187eaeecd4f2e9187091e3 100644 (file)
@@ -52,7 +52,8 @@ struct virtio_balloon_config {
 #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_AVAIL    6   /* Available memory as in /proc */
-#define VIRTIO_BALLOON_S_NR       7
+#define VIRTIO_BALLOON_S_CACHES   7   /* Disk caches */
+#define VIRTIO_BALLOON_S_NR       8
 
 /*
  * Memory statistics structure.