aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/lib/xarray.c
diff options
context:
space:
mode:
authorYosry Ahmed <yosryahmed@google.com>2024-04-13 02:24:06 +0000
committerAndrew Morton <akpm@linux-foundation.org>2024-05-05 17:53:38 -0700
commite87b881489085b4832ad417da653739cbace49e7 (patch)
treeaf73af849cdb082bcaa7194194de2403b8bc22e4 /lib/xarray.c
parentmm: zswap: refactor limit checking from zswap_store() (diff)
downloadwireguard-linux-e87b881489085b4832ad417da653739cbace49e7.tar.xz
wireguard-linux-e87b881489085b4832ad417da653739cbace49e7.zip
mm: zswap: move more same-filled pages checks outside of zswap_store()
Currently, zswap_store() checks 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. While we are at it: - Rename the insert_entry label to store_entry to match xa_store(). - Add comment headers for same-filled functions and the main API functions (load, store, invalidate, swapon, swapoff). No functional change intended. Link: https://lkml.kernel.org/r/20240413022407.785696-4-yosryahmed@google.com Signed-off-by: Yosry Ahmed <yosryahmed@google.com> Reviewed-by: Nhat Pham <nphamcs@gmail.com> Reviewed-by: Chengming Zhou <chengming.zhou@linux.dev> Acked-by: Johannes Weiner <hannes@cmpxchg.org> Cc: "Maciej S. Szmigiero" <mail@maciej.szmigiero.name> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'lib/xarray.c')
0 files changed, 0 insertions, 0 deletions