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: <062c9e67-b0e2-0528-399c-e11428485008@gmail.com>
Date: Fri, 18 Jul 2025 11:09:25 +0800
From: Hao Jia <jiahao.kernel@...il.com>
To: Shakeel Butt <shakeel.butt@...ux.dev>
Cc: akpm@...ux-foundation.org, yuzhao@...gle.com, yuanchu@...gle.com,
 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



On 2025/7/18 03:47, Shakeel Butt wrote:
> Hi Hao,
> 
> On Thu, Jul 17, 2025 at 04:28:45PM +0800, Hao Jia wrote:
>> From: Hao Jia <jiahao1@...iang.com>
>>
>> Users can use /sys/kernel/debug/lru_gen to trigger proactive memory reclaim
>> of a specified memcg.
> 

Hi Shakeel,

> Are you using this interface for proactively reclaiming a specific
> memcg? 

I am comparing using /sys/kernel/debug/lru_gen or cgroup.reclaim to 
trigger memory reclaim when MG-LRU is enabled.
For user-mode agents, the two interfaces can achieve the same function.


I see run_cmd() using mem_cgroup_from_id() to get memcg from a
> given id but I don't think we expose ids from mem_cgroup_ids to the
> userspace. Usually we use cgroup_id which is just an inode number for
> the cgroup folder. I wonder if the current users of this interface are
> providing memcg id.

We can get memcg id through ` cat /sys/kernel/debug/lru_gen `.


Thanks,
Hao
> 
>> Currently, statistics such as pgrefill, pgscan and
>> pgsteal will be updated to the /proc/vmstat system memory statistics.
>>
>> 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.
>>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ