Re: [PATCH v2 01/19] mm, swap: rename __read_swap_cache_async to swap_cache_alloc_folio

From: Nhat Pham
Date: Sun Nov 16 2025 - 23:37:27 EST


On Sun, Nov 16, 2025 at 6:12 PM Kairui Song <ryncsn@xxxxxxxxx> wrote:
>
> From: Kairui Song <kasong@xxxxxxxxxxx>
>
> __read_swap_cache_async is widely used to allocate and ensure a folio is
> in swapcache, or get the folio if a folio is already there.
>
> It's not async, and it's not doing any read. Rename it to better present
> its usage, and prepare to be reworked as part of new swap cache APIs.
>
> Also, add some comments for the function. Worth noting that the
> skip_if_exists argument is an long existing workaround that will be
> dropped soon.

Yeah I completely forgot about it. It should (hopefully) be dropped soon.

>
> Reviewed-by: Yosry Ahmed <yosry.ahmed@xxxxxxxxx>
> Signed-off-by: Kairui Song <kasong@xxxxxxxxxxx>

Reviewed-by: Nhat Pham <nphamcs@xxxxxxxxx>