Re: [PATCH v3 02/11] mm, swap: support zswap and zeroswap as vswap backends

Youngjun Park <[email protected]>
Newsgroups gmane.linux.documentation,gmane.linux.kernel.mm,gmane.linux.kernel,gmane.linux.kernel.cgroups
Message-ID <an85AJ8auvXQ3+nk@yjaykim-PowerEdge-T330>
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)

Thanks
Youngjun
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.