Re: [PATCH v5 00/17] mm/mglru: frequency guided promotion (MGLRU-FG)
From: Tianyi Chen
Date: Thu Nov 19 2026 - 06:24:46 EST
On Thu, Nov 19, 2026 at 05:03:32AM +0800, Kairui Song wrote:
> That's because MGLRU deliberately disables hotness tracking for
> MADV_RANDOM areas while CLRU still has refault distance.
[...]
I ran the OpenSearch k-NN test from the RFC thread [1] on this series.
Its .vec/.vex index files are mapped with MADV_RANDOM, so from the
paragraph above I expected no change. With FG the gap is gone in this
test.
Setup: 25fee5b1762b with and without all 17 patches (they applied
cleanly), the same .config, and a fresh 4 vCPU / 5 GiB KVM guest per
kernel. OpenSearch and a one-pass 96 MiB mmap scan share a 1 GiB memcg
with no swap. 5 seeds, lru_gen enabled=7 vs 0. The script is unchanged
from [1].
Medians over the 5 seeds, last 1,000 queries after the scan:
p99 (ms) memcg file refaults .vec resident (MiB)
base, MGLRU 66.18 144,387 99.98
base, lru_gen=0 2.09 0 117.19
FG, MGLRU 2.16 0 117.19
FG, lru_gen=0 2.12 0 117.19
Right after the scan, base MGLRU had already dropped .vec from 117.2
MiB to 54-71 MiB (median 66.3) in all 5 runs. FG kept the full 117.2
MiB in all 5. All 5 seeds go the same way, and classic LRU is the same
on both kernels.
This is one synthetic setup and I tested the series as a whole, so I
can't say which patch makes the difference.
[1]
https://lore.kernel.org/linux-mm/20261119082441.196139-1-hi@xxxxxxxxx/
Thanks,
Tianyi
Assisted-by: LLM