[RFC PATCHv5 0/6] zram: introduce writeback bio batching

From: Yuwen Chen

Date: Fri Nov 21 2025 - 02:15:07 EST


On Fri, 21 Nov 2025 00:21:20 +0900, Sergey Senozhatsky wrote:
> This is a different approach compared to [1]. Instead of
> using blk plug API to batch writeback bios, we just keep
> submitting them and track available of done/idle requests
> (we still use a pool of requests, to put a constraint on
> memory usage). The intuition is that blk plug API is good
> for sequential IO patterns, but zram writeback is more
> likely to use random IO patterns.

> I only did minimal testing so far (in a VM). More testing
> (on real H/W) is needed, any help is highly appreciated.

I conducted a test on an NVMe host. When all requests were random,
this fix was indeed a bit faster than the previous one.

before:
real 0m0.261s
user 0m0.000s
sys 0m0.243s

real 0m0.260s
user 0m0.000s
sys 0m0.244s

real 0m0.259s
user 0m0.000s
sys 0m0.243s

after:
real 0m0.322s
user 0m0.000s
sys 0m0.214s

real 0m0.326s
user 0m0.000s
sys 0m0.206s

real 0m0.325s
user 0m0.000s
sys 0m0.215s

This result is something to be happy about. However, I'm also quite
curious about the test results on devices like UFS, which have
relatively less internal memory.