Skip to contentSkip to conversation

Buffers/caches in VirtIO Balloon driver stats

PATCH Superseded Tomáš Golembiovský 2 participants 4 messages Sep 20, 2017 – Nov 16, 2017

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover Buffers/caches in VirtIO Balloon driver stats

This is a QEMU counterpart to the patch for VirtIO balloon driver posted here:

https://lists.nongnu.org/archive/html/qemu-devel/2017-09/msg05720.html

Tomáš Golembiovský (1):
virtio-balloon: include buffers and chached memory statistics

 hw/virtio/virtio-balloon.c                      | 2 ++
 include/standard-headers/linux/virtio_balloon.h | 4 +++-
 2 files changed, 5 insertions(+), 1 deletion(-)
Signature · 6 lines
2.14.1


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
#1 lore raw

PATCH 1/1 virtio-balloon: include buffers and chached memory statistics

---
 hw/virtio/virtio-balloon.c                      | 2 ++
 include/standard-headers/linux/virtio_balloon.h | 4 +++-
 2 files changed, 5 insertions(+), 1 deletion(-)
hw/virtio/virtio-balloon.c +2 -0
index a705e0ec55..0434784c14 100644
@@ -49,6 +49,8 @@ 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_BUFFERS] = "stat-linux-buffers",
+   [VIRTIO_BALLOON_S_CACHED] = "stat-linux-cached",
    [VIRTIO_BALLOON_S_NR] = NULL
 };
 
include/standard-headers/linux/virtio_balloon.h +3 -1
index 9d06ccd066..d61efbfcee 100644
@@ -52,7 +52,9 @@ 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_BUFFERS  7   /* Buffers memory as in /proc */
+#define VIRTIO_BALLOON_S_CACHED   8   /* Cached memory as in /proc */
+#define VIRTIO_BALLOON_S_NR       9
 
 /*
  * Memory statistics structure.
Signature · 6 lines
2.14.1


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
#2 lore raw

Re: [Qemu-devel] [virtio-dev] [PATCH 1/1] virtio-balloon: include buffers and chached memory statistics

Hello All,

Michael asked me to comment regarding the possibility to get this statistics on Windows.
By using Win32_OperatingSystem WMI class we can calculate the amount of cached memory (https://msdn.microsoft.com/en-us/library/aa394239(v=vs.85).aspx <https://msdn.microsoft.com/en-us/library/aa394239(v=vs.85).aspx> http://brandonlive.com/2010/02/21/measuring-memory-usage-in-windows-7/ <http://brandonlive.com/2010/02/21/measuring-memory-usage-in-windows-7/>), but Windows doesn’t let to distinguish between “cached and buffers” as far as I see.

Best regards,
Yan.

Quoted 44 lines · Tomáš Golembiovský

---
hw/virtio/virtio-balloon.c | 2 ++
include/standard-headers/linux/virtio_balloon.h | 4 +++-

2 files changed, 5 insertions(+), 1 deletion(-)
hw/virtio/virtio-balloon.c +2 -0
index a705e0ec55..0434784c14 100644
@@ -49,6 +49,8 @@ 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_BUFFERS] = "stat-linux-buffers",
+   [VIRTIO_BALLOON_S_CACHED] = "stat-linux-cached",
   [VIRTIO_BALLOON_S_NR] = NULL
 };
 
include/standard-headers/linux/virtio_balloon.h +3 -1
index 9d06ccd066..d61efbfcee 100644
@@ -52,7 +52,9 @@ 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_BUFFERS  7   /* Buffers memory as in /proc */
+#define VIRTIO_BALLOON_S_CACHED   8   /* Cached memory as in /proc */
+#define VIRTIO_BALLOON_S_NR       9
 
 /*
 * Memory statistics structure.
Signature · 6 lines
2.14.1


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
#3 lore raw

Re: [Qemu-devel] [virtio-dev] [PATCH 1/1] virtio-balloon: include buffers and chached memory statistics

Quoted 4 lines · On Thu, 16 Nov 2017 15:38:21 +0200 Yan Vugenfirer <[email protected]> wrote:

Hello All,

Michael asked me to comment regarding the possibility to get this statistics on Windows.
By using Win32_OperatingSystem WMI class we can calculate the amount of cached memory (https://msdn.microsoft.com/en-us/library/aa394239(v=vs.85).aspx <https://msdn.microsoft.com/en-us/library/aa394239(v=vs.85).aspx> http://brandonlive.com/2010/02/21/measuring-memory-usage-in-windows-7/ <http://brandonlive.com/2010/02/21/measuring-memory-usage-in-windows-7/>), but Windows doesn’t let to distinguish between “cached and buffers” as far as I see.

Thanks for the input, Yan. That's definitely good to know.

Tomas

Quoted 49 lines

Best regards,
Yan.

Quoted 44 lines · Tomáš Golembiovský

---
hw/virtio/virtio-balloon.c | 2 ++
include/standard-headers/linux/virtio_balloon.h | 4 +++-

2 files changed, 5 insertions(+), 1 deletion(-)
hw/virtio/virtio-balloon.c +2 -0
index a705e0ec55..0434784c14 100644
@@ -49,6 +49,8 @@ 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_BUFFERS] = "stat-linux-buffers",
+   [VIRTIO_BALLOON_S_CACHED] = "stat-linux-cached",
   [VIRTIO_BALLOON_S_NR] = NULL
 };
 
include/standard-headers/linux/virtio_balloon.h +3 -1
index 9d06ccd066..d61efbfcee 100644
@@ -52,7 +52,9 @@ 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_BUFFERS  7   /* Buffers memory as in /proc */
+#define VIRTIO_BALLOON_S_CACHED   8   /* Cached memory as in /proc */
+#define VIRTIO_BALLOON_S_NR       9
 
 /*
 * Memory statistics structure.
Signature · 6 lines
2.14.1


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
Signature · 5 lines
Tomáš Golembiovský <[email protected]>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]