Re: [PATCH 0/3] mm/zram: route block swap I/O through swap_ops
From: Christoph Hellwig
Date: Wed Jun 17 2026 - 02:18:14 EST
On Wed, Jun 17, 2026 at 11:38:02AM +0800, Jianyue Wu wrote:
> Before I rework or drop the RFC, could you outline how you see that
> core-side model working? In particular:
> - How should a compressed backend like zram or future block device
> plug into swap_iocb / swap_ops?
I don't think that is the right layer. The virtual swap layer that is
currently in the process of being upstreamed is the right level, and
the actual swap devices or swap files are just a dumb backend for what
they higher level code does.
> - What role do you expect zram to keep while the legacy block interface
> remains: current block swap only, or something else?
For now we'll need to keep it working as-is. It is heavily used in
android and potentially elsewhere. Once we have zswap fully working
in the virtual swap layer world it might make sense to say never
compress again in zram when REQ_SWAP is set (or maybe a new
REQ_COPRESSED) so that we can use the core compression code without
breaking existing setups.