Re: [PATCH] zram: modernize writeback interface
From: Sergey Senozhatsky
Date: Wed Mar 26 2025 - 04:15:59 EST
On (25/03/26 15:07), Richard Chang wrote:
> I am just counting how many pages we could writeback per syscall.
> In a worst case, page_index_range with several two-adjacent indices:
> Assume PAGE_SIZE is 4k and index range is around 10000,
>
> page_index_range allows 272 pages per syscall:
> page_index_range=10000-10001 page_index_range=10003-10004...
>
> List_range allows 678 pages per syscall:
> page_index_range=10000-10001,10003-10004...
Page index can be u32, much longer than 10000. With really high
indices you'd probably waste more space on "N-N+1" alone than on
page_index=N. I'd say index-range should be used when there is
a range to begin with.
[..]
> Another alternative thought, how about page_index supporting both
> single instance and ranges?
> The key is shorter and the parser is relatively simpler.
> Eg: page_index=500 page_index=10000-10001
I probably can look into it.