From: Nhat Pham <nphamcs@gmail.com>
To: Axel Rasmussen <axelrasmussen@google.com>
Cc: Shakeel Butt <shakeel.butt@linux.dev>,
Matthew Wilcox <willy@infradead.org>,
Kairui Song <ryncsn@gmail.com>,
lsf-pc@lists.linux-foundation.org,
Yuanchu Xie <yuanchu@google.com>, Wei Xu <weixugc@google.com>,
linux-mm <linux-mm@kvack.org>
Subject: Re: [LSF/MM/BPF TOPIC] Improving MGLRU
Date: Fri, 6 Mar 2026 09:25:58 -0800 [thread overview]
Message-ID: <CAKEwX=NKLXmW7SkOs+gdbQuv+=hFLrBt-Xm2LS6sRT-2z0iAsA@mail.gmail.com> (raw)
In-Reply-To: <CAJHvVcgU8ZgJAymFfxr1FC_bf6gB0mpr=VTbtSdFqY4iVB-WGg@mail.gmail.com>
On Mon, Mar 2, 2026 at 5:32 PM Axel Rasmussen <axelrasmussen@google.com> wrote:
>
> On Fri, Feb 27, 2026 at 9:56 AM Shakeel Butt <shakeel.butt@linux.dev> wrote:
> >
> > On Thu, Feb 26, 2026 at 03:54:22PM +0000, Matthew Wilcox wrote:
> > > On Fri, Feb 20, 2026 at 01:25:33AM +0800, Kairui Song wrote:
> > > > MGLRU has been introduced in the mainline for years, but we still have two LRUs
> > > > today. There are many reasons MGLRU is still not the only LRU implementation in
> > > > the kernel.
> > >
> > > To my mind, the biggest problem with MGLRU is that Google dumped it on us
> > > and ran away. Commit 44958000bada claimed that it was now maintained and
> > > added three people as maintainers. In the six months since that commit,
> > > none of those three people have any commits in mm/! This is a shameful
> > > state of affairs.
> > >
> > > I say rip it out.
> >
> > I have very similar concerns. Though rather than ripping it out, I would like
> > we put efforts in unifying the two reclaim mechanism (traditional & MGLRU) over
> > improving MGLRU.
>
> Shakeel, I think this is a great idea. If you have any ideas around
> low hanging fruit here, please share. I'm planning to invest much more
> time here going forward, so I'd be happy to turn some ideas into
> patches. :)
Not Shakeel, but I did play a bit with MGLRU in experimentations :) We
see some slight positive signals in certain cases, and instability in
others.
Regarding unification - do you feel like active/inactive LRU can also
benefit from MGLRU's aging mechanism? The page table walk, bloom
filter, potentially the lookaround heuristics? That's one huge
difference between these two algorithms, and tackling this difference
can go a long way towards the unification effort.
Somewhat related to that, I think it would also be nice to have some
counters to track how much work is spent on this page table walking
step for MGLRU. Right now with active/inactive LRU, we can look at the
various reclaim pg* stats (pgsteal, pgscan, etc.), both at the host
and at the cgroup levels, to understand the reclaim dynamics of the
current workload: where its spinning its wheel on, what is the reclaim
efficiency (for e.g, pgscan rate / pgsteal rate is a nice proxy
metric), etc. With MGLRU, the page table walk is a bit of a black box
here to me. Can we have some measures of the effort spend here, for
the sake of understanding and diagnostics when problems crop up?
Otherwise, we can only study the overall CPU cycles/PSI, without
knowing the exact source of the regression.
Or maybe there is already such counter, and the documentation is just missing:
https://docs.kernel.org/admin-guide/mm/multigen_lru.html
next prev parent reply other threads:[~2026-03-06 17:26 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-19 17:25 Kairui Song
2026-02-20 18:24 ` Johannes Weiner
2026-02-21 6:03 ` Kairui Song
2026-02-26 1:55 ` Kalesh Singh
2026-02-26 3:06 ` Kairui Song
2026-02-26 10:10 ` wangzicheng
2026-02-26 15:54 ` Matthew Wilcox
2026-02-27 4:31 ` [LSF/MM/BPF] " Barry Song
2026-03-02 17:46 ` Gregory Price
2026-03-05 6:27 ` Barry Song
2026-03-05 7:31 ` Gregory Price
2026-02-27 17:55 ` [LSF/MM/BPF TOPIC] " Shakeel Butt
2026-02-27 18:50 ` Gregory Price
2026-03-03 1:31 ` Axel Rasmussen
2026-03-03 13:39 ` Shakeel Butt
2026-03-05 6:46 ` Chen Ridong
2026-03-06 17:25 ` Nhat Pham [this message]
2026-03-03 1:30 ` Axel Rasmussen
2026-02-27 3:30 ` [LSF/MM/BPF] " Barry Song
2026-03-02 11:10 ` Kairui Song
2026-03-03 4:06 ` Barry Song
2026-03-05 17:13 ` David Stevens
2026-03-05 23:40 ` Barry Song
2026-03-06 16:09 ` David Stevens
2026-02-27 7:11 ` [LSF/MM/BPF TOPIC] " David Rientjes
2026-02-27 10:29 ` Vernon Yang
2026-03-02 12:17 ` Kairui Song
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='CAKEwX=NKLXmW7SkOs+gdbQuv+=hFLrBt-Xm2LS6sRT-2z0iAsA@mail.gmail.com' \
--to=nphamcs@gmail.com \
--cc=axelrasmussen@google.com \
--cc=linux-mm@kvack.org \
--cc=lsf-pc@lists.linux-foundation.org \
--cc=ryncsn@gmail.com \
--cc=shakeel.butt@linux.dev \
--cc=weixugc@google.com \
--cc=willy@infradead.org \
--cc=yuanchu@google.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