Re: [PATCH 1/9] mm, swap: use unified helper for swap cache look up

From: Kairui Song
Date: Wed Aug 27 2025 - 09:46:31 EST


On Wed, Aug 27, 2025 at 10:59 AM Chris Li <chrisl@xxxxxxxxxx> wrote:
>
> Hi Kairui,
>
> This commit message can use some improvement, I feel the part I am
> interested in, what changed is buried in a lot of detail.
>
> The background is that swap_cache_get_folio() used to do readahead
> update as well. It has VMA as part of the argument. However, the
> hibernation usage does not map swap entry to VMA. It was forced to
> call filemap_get_entry() on swap cache instead, due to no VMA.
>
> So the TL; DR; of what this patch does:
>
> Split the swap readahead outside of swap_cache_get_folio(), so that
> the hibernation non VMA usage can reuse swap_cache_get_folio() as
> well. No more calling filemap_get_entry() on swap cache due to lack
> of VMA.
>
> The code itself looks fine. It has gone through some rounds of
> feedback from me already. We can always update the commit message on
> the next iteration.
>
> Acked-by: Chris Li <chrisl@xxxxxxxxxx>

Thanks for the review and suggestions. Sounds good to me, I'll update
this commit message accordingly in the next version.