linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Yuanchu Xie <yuanchu@google.com>
To: Zicheng Wang <wangzicheng@honor.com>
Cc: akpm@linux-foundation.org, hannes@cmpxchg.org, david@redhat.com,
	 axelrasmussen@google.com, mhocko@kernel.org,
	zhengqi.arch@bytedance.com,  shakeel.butt@linux.dev,
	lorenzo.stoakes@oracle.com, weixugc@google.com,
	 Liam.Howlett@oracle.com, vbabka@suse.cz, rppt@kernel.org,
	surenb@google.com,  mhocko@suse.com, corbet@lwn.net,
	linux-mm@kvack.org,  linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] mm/lru_gen: add configuration option to select debugfs/procfs for lru_gen
Date: Mon, 1 Dec 2025 15:35:05 -0600	[thread overview]
Message-ID: <CAJj2-QFM3iwO==3JKQ4nnHfAxYJuyYXZ6uNJUR8rQdf_Q_1x0A@mail.gmail.com> (raw)
In-Reply-To: <20251128025315.3520689-3-wangzicheng@honor.com>

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.

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?

Thanks,
Yuanchu


  parent reply	other threads:[~2025-12-01 21:35 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 [this message]
2025-12-02  2:53     ` wangzicheng
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='CAJj2-QFM3iwO==3JKQ4nnHfAxYJuyYXZ6uNJUR8rQdf_Q_1x0A@mail.gmail.com' \
    --to=yuanchu@google.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=shakeel.butt@linux.dev \
    --cc=surenb@google.com \
    --cc=vbabka@suse.cz \
    --cc=wangzicheng@honor.com \
    --cc=weixugc@google.com \
    --cc=zhengqi.arch@bytedance.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