Re: [PATCH v2 1/3] mm/swap: move LRU insertion out of the swap cache allocator
From: Barry Song
Date: Sun Aug 23 2026 - 04:39:07 EST
On Fri, Aug 21, 2026 at 5:37 PM Alexandre Ghiti <alex@xxxxxxxx> wrote:
>
> The swap cache allocator adds the new folio to the LRU itself, which
> forces every caller to live with that ordering. The next patch needs to
> evaluate the refault of a swapped-in folio *before* it becomes visible to
> reclaim, because folio_add_lru() consumes PG_workingset/PG_active when it
> picks the LRU list (and, under MGLRU, the generation).
>
> So defer the LRU addition to the callers of __swap_cache_alloc_folio(),
> no functional change intended.
>
> Suggested-by: Kairui Song <kasong@xxxxxxxxxxx>
> Signed-off-by: Alexandre Ghiti <alex@xxxxxxxx>
Hi Alexandre,
I’m getting a bit confused, as I noticed that you also have this
patch in another patchset:
https://lore.kernel.org/linux-mm/20260818163221.589352-2-alex@xxxxxxxx/
Why are you including the same patch in two different patchsets?
Thanks
Barry