Re: [PATCH v2 2/2] mm: zswap: Tie per-CPU acomp_ctx lifetime to the pool.

Andrew Morton
2026-03-27T02:23:56Z

On Mon, 16 Mar 2026 18:48:02 -0700 "Kanchana P. Sridhar" <kanchanapsridhar2026@gmail.com> wrote:

> Currently, per-CPU acomp_ctx are allocated on pool creation and/or CPU
> hotplug, and destroyed on pool destruction or CPU hotunplug. This
> complicates the lifetime management to save memory while a CPU is
> offlined, which is not very common.
>
> Simplify lifetime management by allocating per-CPU acomp_ctx once on
> pool creation (or CPU hotplug for CPUs onlined later), and keeping them
> allocated until the pool is destroyed.
>
> ...
>

This is a tricky-looking patch and I haven't yet recorded any reviews,
so could someone please dig in?

Sashiko wasn't apply to apply this patch for either the v1 or v2
series, so no help there.

Thanks.