Re: [RFC PATCH 4/9] mm: zswap: move more same-filled pages checks outside of zswap_store()

From: Nhat Pham
Date: Tue Mar 26 2024 - 17:57:29 EST


On Mon, Mar 25, 2024 at 4:50 PM Yosry Ahmed <yosryahmed@xxxxxxxxxx> wrote:
>
> Currently, zswap_store() check zswap_same_filled_pages_enabled, kmaps
> the folio, then calls zswap_is_page_same_filled() to check the folio
> contents. Move this logic into zswap_is_page_same_filled() as well (and
> rename it to use 'folio' while we are at it).
>
> This makes zswap_store() cleaner, and makes following changes to that
> logic contained within the helper.
>
> Signed-off-by: Yosry Ahmed <yosryahmed@xxxxxxxxxx>

Reviewed-by: Nhat Pham <nphamcs@xxxxxxxxx>