Skip to content

Commit

Permalink
virtio-balloon: include statistics of disk/file caches
Browse files Browse the repository at this point in the history
Signed-off-by: Tomáš Golembiovský <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
  • Loading branch information
nyoxi authored and mstsirkin committed Feb 13, 2018
1 parent e89e7ea commit bf1e714
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions hw/virtio/virtio-balloon.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
};

Expand Down
3 changes: 2 additions & 1 deletion include/standard-headers/linux/virtio_balloon.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit bf1e714

Please sign in to comment.