Re: [PATCH 07/16] mm, swap: add xswap grow trigger on cluster allocation
From: Nhat Pham
Date: Wed Sep 02 2026 - 10:29:26 EST
On Thu, Aug 27, 2026 at 5:45 AM Baoquan He <hebaoquan@xxxxxxxxxx> wrote:
>
> When cluster_alloc_swap_entry() fails to find a free cluster and
> the xswap device still has room to grow, expand the mapped range
> by XSWAP_GROW_CLUSTERS clusters.
>
> Since xswap is always SWP_SOLIDSTATE, no locks need to be dropped
> before calling xswap_map_clusters(), global_cluster_lock is never
> held on this path.
What about local_lock()? I believe we're still holding
percpu_swap_cluster's local lock as we invoke xswap_map_clusters()?
Would this lead to issues :/