RE: [RFC v2 0/3] mm/mglru: proactive aging via memory.aging
From: wangzicheng
Date: Thu Jul 16 2026 - 02:38:27 EST
> Subject: Re: [RFC v2 0/3] mm/mglru: proactive aging via memory.aging
>
> On Tue, Jul 14, 2026 at 08:15:26PM +0800, Zicheng Wang wrote:
> > MGLRU inverts the reclaim order when anonymous memory is faulted in
> > bulk: anonymous pages sit in the young generations while file pages
> > sit in the oldest two, so reclaim evicts hot file pages before cold
> > anonymous pages.
>
> An aging inversion in the reclaim algorithm seems like an exceedingly
> poor justification for a userspace interface to work around them.
Hi Johannes,
Thanks for the reply.
I agree the aging inversion is a real defect, and I have no good fix
for it. But aging is not a workaround for it. Aging is a `MGLRU feature':
rebalancing the generations lets MGLRU's swappiness work as designed,
and we measure gains on both Android and file-cache-bound server
workloads.
The capability already exists in debugfs (the lru_gen "+" command), but
production systems like Android cannot mount debugfs. memory.aging is a
feasible path to that existing primitive. We ship it as a GKI module
across kernels 6.6, 6.12 and 6.18 (Qcom and MTK), with stable
gains on both Android and server workloads. Having it in-tree would be
very helpful.
Best,
Zicheng