From: Baoquan He <baoquan.he@linux.dev>
To: Kairui Song <ryncsn@gmail.com>
Cc: Baoquan He <hebaoquan@kylinos.cn>,
linux-mm@kvack.org, akpm@linux-foundation.org, baohua@kernel.org,
shakeel.butt@linux.dev, axelrasmussen@google.com,
yuanchu@google.com, weixugc@google.com, david@kernel.org,
rostedt@goodmis.org, mhiramat@kernel.org, hannes@cmpxchg.org
Subject: Re: [PATCH v2 3/4] mm/mglru: skip cold PUD subtrees during aging
Date: Wed, 11 Nov 2026 16:23:48 +0800 [thread overview]
Message-ID: <avQmFB0IulJ8loYY@fedora> (raw)
In-Reply-To: <CAMgjq7ANR-ex+qWWjV06b9rE6+0=RP42tzLq5F-M4yw8hb8Qsw@mail.gmail.com>
On 11/11/26 at 03:38pm, Kairui Song wrote:
> On Wed, Nov 11, 2026 at 3:19 PM Baoquan He <baoquan.he@linux.dev> wrote:
...snip...
> > > I think we can drop the PUD ptr walk entirely. The filter only
> > > needs a stable identity for the range walk_pud_range() is iterating,
> > > and (mm, PUD-aligned address) gives that on both sides:
> > >
> > > walk_pud_range(), test and update alike:
> > > (void *)((unsigned long)args->mm ^ (addr & PUD_MASK))
> > >
> > > lru_gen_look_around():
> > > (void *)((unsigned long)vma->vm_mm ^ (pvmw->address & PUD_MASK))
> > >
> > > Will this work? Also I took a look at the hash algorithm of this too:
> >
> > Sorry, missed this mail too, thanks for great suggestion.
> >
> > Yeah, it's a much better way to do pud level filtering. I will
> > switch to it in v3.
>
> Great, we should have a super fast O(1) key calculation then.
>
> > And the same idea on PMD has been merged, your suggestion is earlier
> > than it.
> > 65a9bf08a3e4 mm/mglru: don't use stack pointers when walking PUD and PMD tables
>
> Not sure if I understand this wrongly, but 65a9bf08a3e4 is fixing a
> potential stale stack value, not changing how PMD keys are calculated?
Ah, my bad. It indeed doesn't change how PMD keys are calculated, I
thought about it wrongly on whether pmd key can be calculated the the
similar way as pud. Seems the answer is not worthing.
next prev parent reply other threads:[~2026-11-11 8:24 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-01 6:37 [PATCH v2 0/4] skip empty PUD subtrees during aging with a PUD-level Bloom filter Baoquan He
2026-09-01 6:37 ` [PATCH v2 1/4] mm/mglru: add MM_WALK_EMPTY stats and tracepoint Baoquan He
2026-09-01 7:11 ` Barry Song
2026-09-01 8:18 ` Baoquan He
2026-09-01 23:37 ` Barry Song
2026-09-01 6:37 ` [PATCH v2 2/4] mm/mglru: add PUD-level Bloom filter state and generic helpers Baoquan He
2026-10-16 18:39 ` Kairui Song
2026-11-11 6:42 ` Baoquan He
2026-09-01 6:37 ` [PATCH v2 3/4] mm/mglru: skip cold PUD subtrees during aging Baoquan He
2026-09-01 23:53 ` Barry Song
2026-09-02 2:29 ` Baoquan He
2026-09-02 3:22 ` Baoquan He
2026-09-04 3:41 ` Barry Song
2026-09-04 4:38 ` Baoquan He
2026-10-16 19:53 ` Kairui Song
2026-11-11 7:19 ` Baoquan He
2026-11-11 7:38 ` Kairui Song
2026-11-11 8:23 ` Baoquan He [this message]
2026-09-01 6:37 ` [PATCH v2 4/4] mm/mglru: count PUD subtrees skipped by the PUD-level filter Baoquan He
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=avQmFB0IulJ8loYY@fedora \
--to=baoquan.he@linux.dev \
--cc=akpm@linux-foundation.org \
--cc=axelrasmussen@google.com \
--cc=baohua@kernel.org \
--cc=david@kernel.org \
--cc=hannes@cmpxchg.org \
--cc=hebaoquan@kylinos.cn \
--cc=linux-mm@kvack.org \
--cc=mhiramat@kernel.org \
--cc=rostedt@goodmis.org \
--cc=ryncsn@gmail.com \
--cc=shakeel.butt@linux.dev \
--cc=weixugc@google.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.