From: wangzicheng <wangzicheng@honor.com>
To: Yuanchu Xie <yuanchu@google.com>
Cc: "akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"hannes@cmpxchg.org" <hannes@cmpxchg.org>,
"david@redhat.com" <david@redhat.com>,
"axelrasmussen@google.com" <axelrasmussen@google.com>,
"mhocko@kernel.org" <mhocko@kernel.org>,
"zhengqi.arch@bytedance.com" <zhengqi.arch@bytedance.com>,
"shakeel.butt@linux.dev" <shakeel.butt@linux.dev>,
"lorenzo.stoakes@oracle.com" <lorenzo.stoakes@oracle.com>,
"weixugc@google.com" <weixugc@google.com>,
"Liam.Howlett@oracle.com" <Liam.Howlett@oracle.com>,
"vbabka@suse.cz" <vbabka@suse.cz>,
"rppt@kernel.org" <rppt@kernel.org>,
"surenb@google.com" <surenb@google.com>,
"mhocko@suse.com" <mhocko@suse.com>,
"corbet@lwn.net" <corbet@lwn.net>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
wangtao <tao.wangtao@honor.com>,
wangzhen 00021541 <wangzhen5@honor.com>,
"zhongjinji 00025326" <zhongjinji@honor.com>,
Kairui Song <ryncsn@gmail.com>, Yuanchu Xie <yuanchu@google.com>,
Barry Song <21cnbao@gmail.com>
Subject: RE: [PATCH 2/3] mm/lru_gen: add configuration option to select debugfs/procfs for lru_gen
Date: Tue, 2 Dec 2025 02:53:16 +0000 [thread overview]
Message-ID: <96ebbb5fb5f14322b0df5714fc23097a@honor.com> (raw)
In-Reply-To: <CAJj2-QFM3iwO==3JKQ4nnHfAxYJuyYXZ6uNJUR8rQdf_Q_1x0A@mail.gmail.com>
Hi Yuanchu,
>
> On Thu, Nov 27, 2025 at 8:54 PM Zicheng Wang <wangzicheng@honor.com>
> wrote:
> >
> > Signed-off-by: Zicheng Wang <wangzicheng@honor.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
next prev parent reply other threads:[~2025-12-02 2:53 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-28 2:53 [PATCH 0/3] mm/lru_gen: move lru_gen control interface from debugfs to procfs Zicheng Wang
2025-11-28 2:53 ` [PATCH 1/3] mm/lru_gen: add procfs support for lru_gen interfaces Zicheng Wang
2025-11-28 2:53 ` [PATCH 2/3] mm/lru_gen: add configuration option to select debugfs/procfs for lru_gen Zicheng Wang
2025-11-28 4:33 ` Randy Dunlap
2025-11-28 7:19 ` wangzicheng
2025-12-01 21:35 ` Yuanchu Xie
2025-12-02 2:53 ` wangzicheng [this message]
2025-11-28 2:53 ` [PATCH 3/3] mm/lru_gen: document procfs interface " Zicheng Wang
2025-11-28 15:16 ` [PATCH 0/3] mm/lru_gen: move lru_gen control interface from debugfs to procfs Matthew Wilcox
2025-11-28 16:13 ` Liam R. Howlett
2025-12-01 4:13 ` Barry Song
2025-12-01 6:50 ` wangzicheng
2025-12-01 7:02 ` wangzicheng
2025-12-01 7:45 ` Barry Song
2025-12-01 8:14 ` wangzicheng
2025-12-01 8:48 ` Barry Song
2025-12-01 9:54 ` wangzicheng
2025-12-01 10:39 ` Barry Song
2025-12-01 13:32 ` wangzicheng
2025-12-01 16:57 ` Barry Song
2025-12-02 2:28 ` wangzicheng
2025-12-01 9:00 ` Kairui Song
2025-12-01 12:01 ` zhongjinji
2025-12-01 7:13 ` zhongjinji
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=96ebbb5fb5f14322b0df5714fc23097a@honor.com \
--to=wangzicheng@honor.com \
--cc=21cnbao@gmail.com \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=axelrasmussen@google.com \
--cc=corbet@lwn.net \
--cc=david@redhat.com \
--cc=hannes@cmpxchg.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=mhocko@kernel.org \
--cc=mhocko@suse.com \
--cc=rppt@kernel.org \
--cc=ryncsn@gmail.com \
--cc=shakeel.butt@linux.dev \
--cc=surenb@google.com \
--cc=tao.wangtao@honor.com \
--cc=vbabka@suse.cz \
--cc=wangzhen5@honor.com \
--cc=weixugc@google.com \
--cc=yuanchu@google.com \
--cc=zhengqi.arch@bytedance.com \
--cc=zhongjinji@honor.com \
/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