From: Baoquan He <baoquan.he@linux.dev>
To: Barry Song <baohua@kernel.org>
Cc: linux-mm@kvack.org, akpm@linux-foundation.org,
kasong@tencent.com, qi.zheng@linux.dev, shakeel.butt@linux.dev,
axelrasmussen@google.com, yuanchu@google.com, weixugc@google.com
Subject: Re: [RFC PATCH 1/6] mm/mglru: add PUD-level Bloom filter state
Date: Fri, 21 Aug 2026 11:00:31 +0800 [thread overview]
Message-ID: <aoe_T6-x0iQsG2SM@fedora> (raw)
In-Reply-To: <CAGsJ_4xZoSwAkRsz4DzPHQ7B=E0gCzRp93XhdnY+abCvZfg7bA@mail.gmail.com>
On 08/15/26 at 07:20am, Barry Song wrote:
> On Thu, Aug 6, 2026 at 6:30 PM Baoquan He <baoquan.he@linux.dev> wrote:
> >
> > Add a second, coarser pair of double-buffered Bloom filters to
> > struct lru_gen_mm_state. Like the PMD-level filters, they flip
> > each generation, but they operate at 1GB (PUD) granularity so the
> > page table walker can skip whole PUD subtrees whose 512 PMDs would
> > all fail the PMD-level filter. This mainly targets the page tables
> > of processes whose memory lives only on other NUMA nodes
> > (cross-node empty walks).
> >
> > No behavior change yet; the filters are populated and consumed by
> > follow-up patches.
> >
> > Signed-off-by: Baoquan He <baoquan.he@linux.dev>
> > ---
> > include/linux/mmzone.h | 10 +++++++++-
> > 1 file changed, 9 insertions(+), 1 deletion(-)
> >
> > diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
> > index a26c8b855222..2bda24522d9f 100644
> > --- a/include/linux/mmzone.h
> > +++ b/include/linux/mmzone.h
> > @@ -608,8 +608,16 @@ struct lru_gen_mm_state {
> > struct list_head *head;
> > /* where the last iteration ended before */
> > struct list_head *tail;
> > - /* Bloom filters flip after each iteration */
> > + /* PMD-level Bloom filters flip after each iteration */
> > unsigned long *filters[NR_BLOOM_FILTERS];
> > + /*
> > + * PUD-level Bloom filters flip after each iteration. Same double
> > + * buffering as the PMD-level filters, but coarser: they remember
> > + * which 1GB PUD subtrees had young leaf entries last generation,
> > + * so walk_pud_range() can skip whole subtrees whose PMD iteration
> > + * would find nothing worth scanning (e.g. cross-node empty walks).
> > + */
> > + unsigned long *pud_filters[NR_BLOOM_FILTERS];
>
> Could we rename them to pmd_filters and pud_filters rather
> than filters and pud_filters? The current naming looks a bit
> inconsistent.
>
> I also feel the names are quite self-explanatory, so perhaps we don't
> need such a long comment here?
Thanks for careful reviewing, and this is a great idea, will change it
as suggested.
>
> > /* the mm stats for debugging */
> > unsigned long stats[NR_HIST_GENS][NR_MM_STATS];
> > };
> > --
> > 2.54.0
> >
>
> Best Regards
> Barry
next prev parent reply other threads:[~2026-08-21 3:00 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-06 10:29 [RFC PATCH 0/6] mm/mglru: skip empty PUD subtrees during aging with PUD-level Bloom filter Baoquan He
2026-08-06 10:29 ` [RFC PATCH 1/6] mm/mglru: add PUD-level Bloom filter state Baoquan He
2026-08-14 23:20 ` Barry Song
2026-08-21 3:00 ` Baoquan He [this message]
2026-08-06 10:29 ` [RFC PATCH 2/6] mm/mglru: refactor Bloom filter helpers for two filter levels Baoquan He
2026-08-06 10:29 ` [RFC PATCH 3/6] mm/mglru: skip empty PUD subtrees during aging Baoquan He
2026-08-14 23:28 ` Barry Song
2026-08-21 3:30 ` Baoquan He
2026-08-06 10:29 ` [RFC PATCH 4/6] mm/mglru: report hot PUDs from the rmap feedback path Baoquan He
2026-08-14 23:36 ` Barry Song
2026-08-21 6:21 ` Baoquan He
2026-08-06 10:29 ` [RFC PATCH 5/6] mm/mglru: add MM_WALK_EMPTY stats and tracepoint for cross-node measurement Baoquan He
2026-08-06 11:05 ` [RFC PATCH 0/6] mm/mglru: skip empty PUD subtrees during aging with PUD-level Bloom filter Baoquan He
2026-08-07 9:23 ` [PATCH 1/4] mm/mglru: add MM_WALK_EMPTY stats and tracepoint for cross-node measurement Baoquan He
2026-08-07 9:23 ` [PATCH 2/4] mm/mglru: suppress cross-node empty page table walks Baoquan He
2026-08-07 9:23 ` [PATCH 3/4] mm/mglru: add debugfs knob to control cross-node empty walk skip threshold Baoquan He
2026-08-07 9:23 ` [PATCH 4/4] mm/mglru: invalidate empty-walk skip on page fault and migration 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=aoe_T6-x0iQsG2SM@fedora \
--to=baoquan.he@linux.dev \
--cc=akpm@linux-foundation.org \
--cc=axelrasmussen@google.com \
--cc=baohua@kernel.org \
--cc=kasong@tencent.com \
--cc=linux-mm@kvack.org \
--cc=qi.zheng@linux.dev \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox