Re: [PATCH v3 02/11] mm, swap: support zswap and zeroswap as vswap backends
From: Nhat Pham
Date: Sat Aug 15 2026 - 20:44:21 EST
On Fri, Aug 14, 2026 at 8:49 AM Youngjun Park <youngjun.park@xxxxxxx> wrote:
>
> On Thu, Aug 06, 2026 at 11:42:45AM -0700, Nhat Pham wrote:
>
>
> > @@ -537,7 +562,12 @@ swap_cluster_populate(struct swap_info_struct *si,
> > * Only cluster isolation from the allocator does table allocation.
> > * Swap allocator uses percpu clusters and holds the local lock.
> > */
> > - lockdep_assert_held(&this_cpu_ptr(&percpu_swap_cluster)->lock);
> > +#ifdef CONFIG_VSWAP
> > + if (swap_is_vswap(si))
> > + lockdep_assert_held(&this_cpu_ptr(&percpu_vswap_cluster)->lock);
> > +#endif
> > + if (!swap_is_vswap(si))
> Hello Nhat
>
> Does vswap actually come in at populate time?
> For free clusters (dynamic ci),
> isn't the cluster freed immediately rather than going through this path?
>
> If it is right, then just validation seems good enough. (assure vswap does not come in)
Acked. You're right I think. This got me staring at the code along
this direction, and I discovered another code path where I provisioned
for vswap's sake unnecessarily (cluster_reclaim_range()) - will fix
this in the next version.
Thanks for the review, Youngjun!
>
> Thanks
> Youngjun
>