Subject: [PATCH] mm/balloon: expose per-node balloon pages in node meminfo

From: Hao Ge <[email-masked]>
Date: Fri, 8 May 2026 09:53:16 +0800

Commit 835de37603ef ("meminfo: add a per node counter for balloon
drivers") added NR_BALLOON_PAGES and exposed it in /proc/meminfo.
However, the per-node view at /sys/devices/system/node/nodeX/meminfo
was not updated, even though the counter is already tracked per-node.

Add it to node_read_meminfo() so users can see balloon usage per
NUMA node without having to parse the raw vmstat file.

Signed-off-by: Hao Ge <[email-masked]>
---
 drivers/base/node.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/base/node.c b/drivers/base/node.c
index d7647d077b66..53f4e51d6d82 100644
--- a/drivers/base/node.c
+++ b/drivers/base/node.c
@@ -513,6 +513,7 @@ static ssize_t node_read_meminfo(struct device *dev,
 			     "Node %d Slab:           %8lu kB\n"
 			     "Node %d SReclaimable:   %8lu kB\n"
 			     "Node %d SUnreclaim:     %8lu kB\n"
+			     "Node %d Balloon:        %8lu kB\n"
 #ifdef CONFIG_TRANSPARENT_HUGEPAGE
 			     "Node %d AnonHugePages:  %8lu kB\n"
 			     "Node %d ShmemHugePages: %8lu kB\n"
@@ -543,7 +544,8 @@ static ssize_t node_read_meminfo(struct device *dev,
 				    node_page_state(pgdat, NR_KERNEL_MISC_RECLAIMABLE)),
 			     nid, K(sreclaimable + sunreclaimable),
 			     nid, K(sreclaimable),
-			     nid, K(sunreclaimable)
+			     nid, K(sunreclaimable),
+			     nid, K(node_page_state(pgdat, NR_BALLOON_PAGES))
 #ifdef CONFIG_TRANSPARENT_HUGEPAGE
 			     ,
 			     nid, K(node_page_state(pgdat, NR_ANON_THPS)),
-- 
2.25.1