[PATCHv2 0/7] zram: introduce compressed data writeback

From: Sergey Senozhatsky
Date: Mon Dec 01 2025 - 04:48:16 EST


As writeback becomes more common there is another shortcoming
that needs to be addressed - compressed data writeback. Currently
zram does uncompressed data writeback which is not optimal due to
potential CPU and battery wastage. This series changes suboptimal
uncompressed writeback to a more optimal compressed data writeback.

v1 -> v2:
- made compressed writeback configurable via device attribute
- added missing batch_size documentation
- switched to guard() for init_lock
- more code tweaks and cleanups

Richard Chang (2):
zram: introduce compressed data writeback
zram: introduce writeback_compressed device attribute

Sergey Senozhatsky (5):
zram: document writeback_batch_size
zram: move bd_stat to writeback section
zram: rename zram_free_page()
zram: switch to guard() for init_lock
zram: consolidate device-attr declarations

Documentation/ABI/testing/sysfs-block-zram | 14 +
Documentation/admin-guide/blockdev/zram.rst | 24 +-
drivers/block/zram/zram_drv.c | 589 ++++++++++++--------
drivers/block/zram/zram_drv.h | 1 +
4 files changed, 406 insertions(+), 222 deletions(-)

--
2.52.0.487.g5c8c507ade-goog