Skip to content

zram: support asynchronous writeback

Richard Chang linux-block linux-mm lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 3 repliesIn review
  2. v11 patch 7 repliesSuperseded

Changes in v2 from the cover letter

- Rebase and spilt to a series of patchset
- Add test results
- Link to v1: https://lore.kernel.org/all/[email protected]/

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3zram: refactor writeback helpersdrivers/block/zram/Makefile drivers/block/zram/zram_drv.c drivers/block/zram/zram_drv.h +2 more+74 -431 reply
2/3zram: add async writeback infrastructuredrivers/block/zram/zram_drv.c drivers/block/zram/zram_wb.c drivers/block/zram/zram_wb.h+140 -01 reply
3/3zram: enable asynchronous writebackdrivers/block/zram/zram_drv.c drivers/block/zram/zram_drv.h drivers/block/zram/zram_wb.c +1 more+161 -681 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/3] zram: support asynchronous writeback

This patch series introduces asynchronous writeback to the zram module. By moving to an asynchronous model, we can perform writeback operations more efficiently.

The series is structured as follows:

The first patch is a preparatory refactoring that moves all writeback-related code into its own files (zram_wb.[ch]) without any functional changes.

The second patch introduces the core infrastructure for asynchronicity, including a dedicated kthread, a request queue, and helper functions to manage writeback requests.

The final patch enables asynchronous writeback by switching from submit_bio_wait() to the non-blocking submit_bio(). This patch also includes performance benchmarks demonstrating a 27% improvement in idle writeback speed on an Android platform.

Changes in v2:
- Rebase and spilt to a series of patchset
- Add test results
- Link to v1: https://lore.kernel.org/all/[email protected]/

Richard Chang (3):
zram: refactor writeback helpers
zram: add async writeback infrastructure
zram: enable asynchronous writeback

 drivers/block/zram/Makefile   |   1 +
 drivers/block/zram/zram_drv.c | 157 +++++++--------------
 drivers/block/zram/zram_drv.h |  30 ++++
 drivers/block/zram/zram_wb.c  | 248 ++++++++++++++++++++++++++++++++++
 drivers/block/zram/zram_wb.h  |  42 ++++++
 5 files changed, 371 insertions(+), 107 deletions(-)
 create mode 100644 drivers/block/zram/zram_wb.c
 create mode 100644 drivers/block/zram/zram_wb.h
Signature · 1 line
2.50.1.565.gc32cd1483b-goog