Re: [PATCH v2 1/3] mm/swap: move LRU insertion out of the swap cache allocator

Barry Song <[email protected]>
Newsgroups org.kvack.linux-mm,org.kernel.vger.linux-kernel
Message-ID <CAGsJ_4zHcW8oJBRmCDB2WYFc_uv9KP+M0fxOgnnfmA3+x06t4A@mail.gmail.com>
On Fri, Aug 21, 2026 at 5:37 PM Alexandre Ghiti <[email protected]> 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 <[email protected]>
> Signed-off-by: Alexandre Ghiti <[email protected]>

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/[email protected]/

Why are you including the same patch in two different patchsets?

Thanks
Barry
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.