Re: [PATCH] mm: synchronize with PTE table reclaim for all folio sizes
From: Barry Song
Date: Tue Nov 10 2026 - 03:57:36 EST
On Tue, Nov 10, 2026 at 2:24 PM Baolin Wang
<baolin.wang@xxxxxxxxxxxxxxxxx> wrote:
>
> Hi Barry,
[...]
>
> Sorry for the rough quick measurement last Friday :(.
>
> I found the first memory.reclaim() trigger has high variance because
> folio_check_references() activates folios. After the folios' reference
> flag are consumed, memory.reclaim() shows no regression with or without
> the TTU_SYNC flag, and the data is relatively stable.
>
We have MADV_PAGEOUT, which bypasses
folio_check_references(). Could it help make the test more stable?
mm: madvise: pageout: ignore references rather than clearing young
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2864f3d0f5831a
> However, my testing is simple and doesn't cover concurrent stress
> scenarios. Whether to set the TTU_SYNC flag for small folios can be
> discussed in a separate patch, along with how to evaluate the impact.
Thanks,
Barry