I think MGLRU isn't ready for a lot of uses unless it keeps the paired lists
I think MGLRU isn't ready for a lot of uses unless it keeps the paired lists
Posted Mar 6, 2026 14:10 UTC (Fri) by PeeWee (subscriber, #175777)In reply to: I think MGLRU isn't ready for a lot of uses unless it keeps the paired lists by jthill
Parent article: Reconsidering the multi-generational LRU
I don't think the swappiness knob was actually disabled. It's just rendered useless, allegedly, because anon pages tend to hijack the younger generations and are thus never considered in the reclaim path. But the question is, if the complainant may have discovered that their workload actually does lean more heavily towards anon pages. That might be a genuine improvement, but they didn't expect it because experience with previous kernel behavior may have clouded or biased their judgement.
I've just checked and MGLRU is enabled on my Ubuntu 24.04 laptop with Linux 6.17. Since I am using zswap, I have also set an aggressiveswappiness=180. I have ~14.5 GiB of total RAM (16 - iGPU RAM) and I sometimes push the limits with tmpfs usage. But way before I hit 12 GiB commited, (z)swapping starts, with plenty of cache available for supposedly cheap eviction. If the mentioned complaint pointed to a real problem, wouldn't I also see that all page cache is evicted first? And there is also, as I've just written above, the refault distance tracking of file pages, which can correct for overly eager cache eviction by increasing the length of the inactive list. Or does that also work differently, or not at all, with MGLRU?
