Re: [PATCH v3 00/14] mm, swap: extendable swap devices (xswap)

From: Nhat Pham

Date: Fri Sep 18 2026 - 14:08:09 EST


On Thu, Sep 17, 2026 at 5:13 PM Nhat Pham <nphamcs@xxxxxxxxx> wrote:
>
> On Wed, Sep 16, 2026 at 3:19 AM Baoquan He <hebaoquan@xxxxxxxxxx> wrote:
>
> Constraint liberates; liberty constrains.
>
> So let me flip it on its head. What if we keep the interface I already
> have, and use your data structure instead? I tried that too [2], and it
> was significantly easier, because it is just a data structure change,
> without having to accomodate for the full interface of swap device.

Here's an updated version of this proposal:

https://lore.kernel.org/all/20260918180241.3424851-12-nphamcs@xxxxxxxxx/

Per your earlier request, I also:

1. Moved the virtual_table inside struct swap_cluster_info (since the
virtual table is the only new field now), and deleted the new dynamic
cluster struct.

2. I skip the shrinking mechanism, but instead I dynamically freed the
virtual table to minimize metadata overhead of free clusters.

I have not run performance tests yet, but it has survived a couple of
simple stress test rounds that I threw at it so far.

If you think this is a good proposal, please pick it up and drive it.
The code is yours :)