Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "David Hildenbrand (Arm)" <david@kernel.org>
To: Hao Ge <hao.ge@linux.dev>, Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org, virtualization@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/balloon: expose per-node balloon pages in node meminfo
Date: Fri, 8 May 2026 10:23:11 +0200	[thread overview]
Message-ID: <731d7324-4eb7-44d2-bb7d-62b6fbe11c52@kernel.org> (raw)
In-Reply-To: <20260508015316.25722-1-hao.ge@linux.dev>

On 5/8/26 03:53, Hao Ge wrote:
> 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.

Using ballooning with vNUMA is rather rare. But sure, why not.

> 
> Signed-off-by: Hao Ge <hao.ge@linux.dev>
> ---
>  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)),


Shouldn't it be placed under "Unaccepted:", just like for /proc/meminfo?

-- 
Cheers,

David


  reply	other threads:[~2026-05-08  8:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-08  1:53 [PATCH] mm/balloon: expose per-node balloon pages in node meminfo Hao Ge
2026-05-08  8:23 ` David Hildenbrand (Arm) [this message]
2026-05-08  9:59   ` Hao Ge

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=731d7324-4eb7-44d2-bb7d-62b6fbe11c52@kernel.org \
    --to=david@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=hao.ge@linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=virtualization@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