virtio-comment.lists.oasis-open.org archive mirror
 help / color / mirror / Atom feed
From: zhenwei pi <pizhenwei@bytedance.com>
To: virtio-comment@lists.linux.dev, virtio-dev@lists.linux.dev
Cc: david@redhat.com, zhenwei pi <pizhenwei@bytedance.com>
Subject: [PATCH 1/1] balloon: introduce 6 memory statistics
Date: Mon, 13 May 2024 20:10:05 +0800	[thread overview]
Message-ID: <20240513121005.459013-2-pizhenwei@bytedance.com> (raw)
In-Reply-To: <20240513121005.459013-1-pizhenwei@bytedance.com>

Expose more memory statistics of the virtual memory subsystem from
guest, it's helpful to analyze the memory performance and pressure
from host side.

Signed-off-by: zhenwei pi <pizhenwei@bytedance.com>
---
 device-types/balloon/description.tex | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/device-types/balloon/description.tex b/device-types/balloon/description.tex
index a1d9603..bc8e109 100644
--- a/device-types/balloon/description.tex
+++ b/device-types/balloon/description.tex
@@ -305,6 +305,12 @@ \subsubsection{Memory Statistics}\label{sec:Device Types / Memory Balloon Device
 #define VIRTIO_BALLOON_S_CACHES   7
 #define VIRTIO_BALLOON_S_HTLB_PGALLOC 8
 #define VIRTIO_BALLOON_S_HTLB_PGFAIL  9
+#define VIRTIO_BALLOON_S_OOM_KILL       10
+#define VIRTIO_BALLOON_S_ALLOC_STALL    11
+#define VIRTIO_BALLOON_S_ASYNC_SCAN     12
+#define VIRTIO_BALLOON_S_DIRECT_SCAN    13
+#define VIRTIO_BALLOON_S_ASYNC_RECLAIM  14
+#define VIRTIO_BALLOON_S_DIRECT_RECLAIM 15
         le16 tag;
         le64 val;
 } __attribute__((packed));
@@ -399,6 +405,24 @@ \subsubsection{Memory Statistics Tags}\label{sec:Device Types / Memory Balloon D
 
 \item[VIRTIO_BALLOON_S_HTLB_PGFAIL (9)] The number of failed hugetlb page
   allocations in the guest.
+
+\item[VIRTIO_BALLOON_S_OOM_KILL (10)] The number of Out-Of-Memory killer
+  invocations.
+
+\item[VIRTIO_BALLOON_S_ALLOC_STALL (11)] The number of stall count on memory
+  allocation.
+
+\item[VIRTIO_BALLOON_S_ASYNC_SCAN (12)] The amount of memory that has been
+  scanned asynchronously (in bytes).
+
+\item[VIRTIO_BALLOON_S_DIRECT_SCAN (13)] The amount of memory that has been
+  scanned directly (in bytes).
+
+\item[VIRTIO_BALLOON_S_ASYNC_RECLAIM (14)] The amount of memory that has been
+  reclaimed asynchronously (in bytes).
+
+\item[VIRTIO_BALLOON_S_DIRECT_RECLAIM (15)] The amount of memory that has been
+  reclaimed directly (in bytes).
 \end{description}
 
 \subsubsection{Free Page Hinting}\label{sec:Device Types / Memory Balloon Device / Device Operation / Free Page Hinting}
-- 
2.34.1


  reply	other threads:[~2024-05-15  8:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-13 12:10 [PATCH 0/1] balloon: introduce 6 memory statistics zhenwei pi
2024-05-13 12:10 ` zhenwei pi [this message]
2024-05-21  3:50   ` [PATCH 1/1] " Michael S. Tsirkin
2024-05-21  4:57     ` zhenwei pi
     [not found]     ` <db3b8a29-db67-4e85-9b2d-314cb2924c88@bytedance.com>
2024-05-27  3:34       ` PING: " zhenwei pi
2024-05-27  6:37   ` Michael S. Tsirkin
2024-05-27  9:02     ` zhenwei pi
2024-05-21  3:43 ` PING: [PATCH 0/1] " zhenwei pi
2024-05-27  6:41 ` Michael S. Tsirkin

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=20240513121005.459013-2-pizhenwei@bytedance.com \
    --to=pizhenwei@bytedance.com \
    --cc=david@redhat.com \
    --cc=virtio-comment@lists.linux.dev \
    --cc=virtio-dev@lists.linux.dev \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).