Re: [PATCH v3 02/11] mm, swap: support zswap and zeroswap as vswap backends
Nhat Pham <[email protected]>
| Newsgroups | org.kvack.linux-mm,org.kernel.vger.cgroups,org.kernel.vger.linux-doc,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <CAKEwX=Mrdk+6WF0s6gz-5N8rNPzz3gEgUF9SeTB4O78zXQcEKg@mail.gmail.com> |
On Fri, Aug 14, 2026 at 8:49 AM Youngjun Park <[email protected]> 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 >