Re: [PATCH] zram: modernize writeback interface
From: Sergey Senozhatsky
Date: Wed Mar 26 2025 - 00:18:02 EST
Hi,
On (25/03/26 12:03), Richard Chang wrote:
> Hi Sergey,
> Since the input buffer length is only PAGE_SIZE long, can we reduce
> the duplicated "page_index_range=" strings?
> Eg:
> Turn
> echo page_index_range=100-200 \
> page_index_range=500-700 > zram0/writeback
> To:
> echo page_index_range=100-200,500-700 > zram0/writeback
Do you expect to ever have so many ranges that PAGE_SIZE buffer
would be too small? I didn't want to put a list parser into
the kernel, I wanted to keep arguments parsing as simple as
possible. But if you really need to writeback that many pages
then I guess I can implement it as a list of ranges.
Alternatively:
We don't necessarily need to use page_index_range key, which is a
little long, but can use page_indices=/page_indexes= or just pages=?