Re: [PATCH v4] zram: Implement multi-page write-back

Yuwen Chen
2025-11-13T07:55:32Z

On Thu, 13 Nov 2025 11:04:04 +0900, Sergey Senozhatsky wrote:
> How was this number chosen? Did you try lower/higher values?
> I think we might want this to be runtime tunable via sysfs, e.g.
> writeback_batch_size attr, with min value of 1.

I haven't conducted any tests on this value. I just set an empirical
value of 32 based on the submission queue length of the storage device.

As you said, providing a sys node for configuration might offer
performance advantages for mechanical hard drives.

On Thu, 13 Nov 2025 11:20:15 +0900, Sergey Senozhatsky wrote:
> So I wonder if things will look simpler (is this the word I'm looking
> for?) if you just have two lists for requests: one list for completed/idle
> requests and one list for in-flight requests (and you move requests
> around accordingly). Then you don't need to iterate the pool and check
> flags, you just can check list_empty(&idle_requests) and take the first
> (front) element.

Yes, using two linked lists can reduce the complexity. It's just that
before I saw your submission, I couldn't find a better way to avoid
introducing locks. Thank you very much!