Re: [PATCH RFC v2 3/5] zram: Introduce zcomp-managed streams

From: Sergey Senozhatsky

Date: Wed Mar 11 2026 - 05:01:34 EST


Hi,

On (26/03/10 21:31), Jihan LIN wrote:
> Yes, the acomp crypto API can cover my user case. However, per-cpu
> streams can still limit concurrency to num_online_cpus() even with acomp
> as in mm/zswap.c. And simply replacing them with a global idle stream
> list leads to a significant lock contention regression, as tested by
> Kairui[1].
>
> Would it make sense to try using per-CPU stream first and fallback to a
> global idle stream pool only when the per-cpu stream is busy? Happy to
> help with the migration effort.

That's a good and difficult question. I was not planning on
re-introducing an idle list, wanted to keep things per-CPU,
the way they currently are. Hmm but our per-CPU model doesn't
fit at all. I don't have any good ideas now.