Re: [RFC PATCH 0/7] mm: store zswap entries in swap table (Pointer entry)
From: Nhat Pham
Date: Tue Jul 07 2026 - 15:28:03 EST
On Tue, Jul 7, 2026 at 12:32 AM Baoquan He <baoquan.he@xxxxxxxxx> wrote:
>
> Currently zswap uses a per-swap-device xarray to map swap offsets to
> zswap_entry pointers. This introduces an additional tree walk on every
> zswap entry access.
>
> This series replaces the xarray with a "Pointer" entry type stored
> directly in the swap cluster table. The new swp_tb_t variant embeds
> a zswap_entry pointer plus a entry count, eliminating the xarray and
> its lookup overhead entirely.
>
Have you had the chance to review the virtual swap work (latest
version in [1])? At a first glance, it bears a lot of similarity to
this.
We're envisioning this to be the future architecture for zswap :) Is
there anything that is missing that would satisfy your use case too?
[1]: https://lore.kernel.org/all/20260612193738.2183968-1-nphamcs@xxxxxxxxx/