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

From: Jihan LIN

Date: Tue Mar 10 2026 - 10:25:09 EST


Hi Sergey,

On Tue, Mar 10, 2026 at 9:05 AM Sergey Senozhatsky
<senozhatsky@xxxxxxxxxxxx> wrote:
> zcomp doesn't support hardware-accelerated compression, and that's
> why we plan to delete zcomp API sometime this year and switch to a
> acomp crypto API instead.

Thanks for the note.

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.

Best Regards,
Jihan

[1]: https://lore.kernel.org/all/CAMgjq7BFUrUY5Xq5Eks4ibqbWgJcca1vqB4kq=otQVyG=23FRw@xxxxxxxxxxxxxx/