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] [day] [month] [year] [list]
Message-ID: <96ebbb5fb5f14322b0df5714fc23097a@honor.com>
Date: Tue, 2 Dec 2025 02:53:16 +0000
From: wangzicheng <wangzicheng@...or.com>
To: Yuanchu Xie <yuanchu@...gle.com>
CC: "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
	"hannes@...xchg.org" <hannes@...xchg.org>, "david@...hat.com"
	<david@...hat.com>, "axelrasmussen@...gle.com" <axelrasmussen@...gle.com>,
	"mhocko@...nel.org" <mhocko@...nel.org>, "zhengqi.arch@...edance.com"
	<zhengqi.arch@...edance.com>, "shakeel.butt@...ux.dev"
	<shakeel.butt@...ux.dev>, "lorenzo.stoakes@...cle.com"
	<lorenzo.stoakes@...cle.com>, "weixugc@...gle.com" <weixugc@...gle.com>,
	"Liam.Howlett@...cle.com" <Liam.Howlett@...cle.com>, "vbabka@...e.cz"
	<vbabka@...e.cz>, "rppt@...nel.org" <rppt@...nel.org>, "surenb@...gle.com"
	<surenb@...gle.com>, "mhocko@...e.com" <mhocko@...e.com>, "corbet@....net"
	<corbet@....net>, "linux-mm@...ck.org" <linux-mm@...ck.org>,
	"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, wangtao
	<tao.wangtao@...or.com>, wangzhen 00021541 <wangzhen5@...or.com>, "zhongjinji
 00025326" <zhongjinji@...or.com>, Kairui Song <ryncsn@...il.com>, Yuanchu Xie
	<yuanchu@...gle.com>, Barry Song <21cnbao@...il.com>
Subject: RE: [PATCH 2/3] mm/lru_gen: add configuration option to select
 debugfs/procfs for lru_gen

Hi Yuanchu,

> 
> On Thu, Nov 27, 2025 at 8:54 PM Zicheng Wang <wangzicheng@...or.com>
> wrote:
> >
> > Signed-off-by: Zicheng Wang <wangzicheng@...or.com>
> > ---
> >  mm/Kconfig | 10 ++++++++++
> >  1 file changed, 10 insertions(+)
> >
> > diff --git a/mm/Kconfig b/mm/Kconfig
> > index e443fe8cd..be7efa794 100644
> > --- a/mm/Kconfig
> > +++ b/mm/Kconfig
> > @@ -1325,6 +1325,16 @@ config LRU_GEN_STATS
> >  config LRU_GEN_WALKS_MMU
> >         def_bool y
> >         depends on LRU_GEN && ARCH_HAS_HW_PTE_YOUNG
> > +
> > +config LRU_GEN_PROCFS_CTRL
> > +       bool "Move lru_gen files from debugfs to procfs"
> > +       depends on LRU_GEN && PROC_FS
> > +       help
> > +         Move lru_gen management from debugfs to procfs (/proc/lru_gen).
> > +         This production-ready feature provides critical memory reclaim
> > +         prediction and control. It is no longer experimental.
> > +         The migration ensures availability in commercial products where
> > +         debugfs may be disabled.
> Hi Zicheng,
> 
> A config option determining where LRU_gen files reside creates a
> fragile procfs interface. Consider adding a similar interface with
> less implementation detail to /sys/kernel/mm/lru_gen/ if the goal is
> to stabilize the debugfs APIs.

Thank you for the comments.
Your suggestion on sysfs really make sence. The only challenge is the show
buffers of sysfs are limited to PAGE_SIZE according to the kernel doc.
It can hardly show all memcg infos in a single read, as debugfs file
currently does.

> 
> If the goal is to proactively age lruvecs that have been at
> MIN_NR_GENS for some time/events/etc, is it possible to integrate this
> into the kernel and avoid leaking MGLRU implementation details into
> userspace?

We will explore the possible options in the next version. :-)

> 
> Thanks,
> Yuanchu

Best,
Zicheng

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ