Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Baoquan He <baoquan.he@linux.dev>
To: linux-mm@kvack.org
Cc: akpm@linux-foundation.org, kasong@tencent.com,
	qi.zheng@linux.dev, shakeel.butt@linux.dev, baohua@kernel.org,
	axelrasmussen@google.com, yuanchu@google.com, weixugc@google.com
Subject: Re: [RFC PATCH 0/6] mm/mglru: skip empty PUD subtrees during aging with PUD-level Bloom filter
Date: Thu, 6 Aug 2026 19:05:31 +0800	[thread overview]
Message-ID: <anRqew3VikVzxJJb@MiWiFi-R3L-srv> (raw)
In-Reply-To: <20260806103003.3924438-1-baoquan.he@linux.dev>

On 08/06/26 at 06:29pm, Baoquan He wrote:
> Problem
> =======
> 
> MGLRU's aging walks every present PUD of every mm in the mm_list.  When
> an mm has no pages on a given NUMA node, all 512 PMDs in each PUD fail
> the existing PMD-level Bloom filter test, yet the walker still descends
> every PUD and iterates every PMD ??? pure waste.
> 
> These cross-node empty walks are structural: lru_gen_use_mm() sets
> mm->lru_gen.bitmap to -1 (all nodes) at each context switch, so every
> node's kswapd independently walks the same mm.  On a 2-node KVM guest,
> ~80% of all aging walks are empty; the worst-case leaf-traversal waste
> with a fully resident remote mm is ~73%.

A note on the design background and one limitation.

These patches replace my earlier per-mm empty_map approach, which skipped
an mm for K generations  (default 4) after an empty walk on a node. As
Kairui pointed out, that leaves a window of up to K generations during which
pages migrated into the node are not scanned by aging until the forced  rescan,
and it adds 16 bytes of per-mm state with awkward invalidation semantics.
Following his  suggestion, the series instead adds a PUD-level Bloom filter — a
coarser counterpart of the existing  PMD-level filter — so a 1GB subtree that
had no young entries for this lruvec last generation is skipped, with no per-mm
state and no blind window.

I will paste the empty_map patches to this thread for reviewers'
reference.


  parent reply	other threads:[~2026-08-06 11:05 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
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 ` Baoquan He [this message]
2026-08-07  9:23   ` [PATCH 1/4] " 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=anRqew3VikVzxJJb@MiWiFi-R3L-srv \
    --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