lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <oiues63fvb5xx45pue676iso3d3mcqboxdtmcfldwj4xm7q4g7@rxrgpz5l23ok>
Date: Tue, 11 Mar 2025 21:20:48 -0700
From: Shakeel Butt <shakeel.butt@...ux.dev>
To: Nico Pache <npache@...hat.com>
Cc: linux-hyperv@...r.kernel.org, linux-kernel@...r.kernel.org, 
	virtualization@...ts.linux.dev, xen-devel@...ts.xenproject.org, linux-fsdevel@...r.kernel.org, 
	linux-mm@...ck.org, cgroups@...r.kernel.org, kys@...rosoft.com, 
	haiyangz@...rosoft.com, wei.liu@...nel.org, decui@...rosoft.com, 
	jerrin.shaji-george@...adcom.com, bcm-kernel-feedback-list@...adcom.com, arnd@...db.de, 
	gregkh@...uxfoundation.org, mst@...hat.com, david@...hat.com, jasowang@...hat.com, 
	xuanzhuo@...ux.alibaba.com, eperezma@...hat.com, jgross@...e.com, sstabellini@...nel.org, 
	oleksandr_tyshchenko@...m.com, akpm@...ux-foundation.org, hannes@...xchg.org, mhocko@...nel.org, 
	roman.gushchin@...ux.dev, muchun.song@...ux.dev, nphamcs@...il.com, yosry.ahmed@...ux.dev, 
	kanchana.p.sridhar@...el.com, alexander.atanasov@...tuozzo.com
Subject: Re: [RFC 1/5] meminfo: add a per node counter for balloon drivers

On Tue, Mar 11, 2025 at 06:06:56PM -0600, Nico Pache wrote:
> Add NR_BALLOON_PAGES counter to track memory used by balloon drivers and
> expose it through /proc/meminfo and other memory reporting interfaces.
> 
> Signed-off-by: Nico Pache <npache@...hat.com>
> ---
>  fs/proc/meminfo.c      | 2 ++
>  include/linux/mmzone.h | 1 +
>  mm/memcontrol.c        | 1 +
>  mm/show_mem.c          | 4 +++-
>  mm/vmstat.c            | 1 +
>  5 files changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/proc/meminfo.c b/fs/proc/meminfo.c
> index 8ba9b1472390..83be312159c9 100644
> --- a/fs/proc/meminfo.c
> +++ b/fs/proc/meminfo.c
> @@ -162,6 +162,8 @@ static int meminfo_proc_show(struct seq_file *m, void *v)
>  	show_val_kb(m, "Unaccepted:     ",
>  		    global_zone_page_state(NR_UNACCEPTED));
>  #endif
> +	show_val_kb(m, "Balloon:        ",
> +		    global_node_page_state(NR_BALLOON_PAGES));
>  
>  	hugetlb_report_meminfo(m);
>  
> diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
> index 9540b41894da..71d3ff19267a 100644
> --- a/include/linux/mmzone.h
> +++ b/include/linux/mmzone.h
> @@ -223,6 +223,7 @@ enum node_stat_item {
>  #ifdef CONFIG_HUGETLB_PAGE
>  	NR_HUGETLB,
>  #endif
> +	NR_BALLOON_PAGES,
>  	NR_VM_NODE_STAT_ITEMS
>  };
>  
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index 4de6acb9b8ec..182b44646bfa 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -1377,6 +1377,7 @@ static const struct memory_stat memory_stats[] = {
>  #ifdef CONFIG_HUGETLB_PAGE
>  	{ "hugetlb",			NR_HUGETLB			},
>  #endif
> +	{ "nr_balloon_pages",		NR_BALLOON_PAGES		},

Please remove the above counter from memcontrol.c as I don't think this
memory is accounted towards memcg.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ