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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJj2-QFNvw2dMQtpZt1nHjKYdJWCH_=w2=2RWLL6m__MBb6KpQ@mail.gmail.com>
Date: Thu, 17 Jul 2025 13:18:20 -0700
From: Yuanchu Xie <yuanchu@...gle.com>
To: Hao Jia <jiahao.kernel@...il.com>
Cc: akpm@...ux-foundation.org, yuzhao@...gle.com, shakeel.butt@...ux.dev, 
	mhocko@...nel.org, lorenzo.stoakes@...cle.com, kinseyho@...gle.com, 
	hannes@...xchg.org, gthelen@...gle.com, david@...hat.com, 
	axelrasmussen@...gle.com, zhengqi.arch@...edance.com, linux-mm@...ck.org, 
	linux-kernel@...r.kernel.org, Hao Jia <jiahao1@...iang.com>
Subject: Re: [PATCH] mm/mglru: Update MG-LRU proactive reclaim statistics only
 to memcg

Hi Hao,

On Thu, Jul 17, 2025 at 1:29 AM Hao Jia <jiahao.kernel@...il.com> wrote:
>
> From: Hao Jia <jiahao1@...iang.com>
>
> Users can use /sys/kernel/debug/lru_gen to trigger proactive memory reclaim
> of a specified memcg. Currently, statistics such as pgrefill, pgscan and
> pgsteal will be updated to the /proc/vmstat system memory statistics.

This is a debugfs interface and it's not meant for use in production
or provide a stable ABI. Does memory.reclaim not work for your needs?

I'm not against the change; I just hope you don't depend on it
continuing to exist/behave a certain way.

Shakeel's comment is accurate. The lru_gen interface uses the internal
memcg id which is not usually used to interface with the userspace.
Reading this file does show the cgroup path and memcg id association.

>
> This will confuse some system memory pressure monitoring tools, making
> it difficult to determine whether pgscan and pgsteal are caused by
> system-level pressure or by proactive memory reclaim of some specific
> memory cgroup.
>
> Therefore, make this interface behave similarly to memory.reclaim.
> Update proactive memory reclaim statistics only to its memory cgroup.
>
> Signed-off-by: Hao Jia <jiahao1@...iang.com>

The patch looks okay to me too.

Thanks,
Yuanchu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ