[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <oc53hpg3st6v3okm5nbaolx6wpnw5tgsat2g4ycgkzze4yxwdv@7brgfyi7jynh>
Date: Wed, 26 Mar 2025 18:31:14 +0900
From: Sergey Senozhatsky <senozhatsky@...omium.org>
To: Richard Chang <richardycc@...gle.com>
Cc: Minchan Kim <minchan@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>, Brian Geffon <bgeffon@...gle.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, Sergey Senozhatsky <senozhatsky@...omium.org>
Subject: Re: [PATCH] zram: modernize writeback interface
On (25/03/26 17:45), Sergey Senozhatsky wrote:
> On (25/03/26 17:15), Sergey Senozhatsky wrote:
> > On (25/03/26 15:07), Richard Chang wrote:
> > [..]
> > > 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.
>
> Can't say I really like that "index" will mean both index and
> a range of indexes. But let me think more.
We can permit multiple page_index= as well
page_index=1000 page_index=2000 page_indexes=5000-6000
because one element range (N-N+1) can easily waste more space
than page_index. (historically zram permitted only one page_index
per call.)
And plural for index comes at two extra bytes, which seems fine.
I'll wait for more opinions.
---
if (!strcmp(param, "page_index")) {
err = parse_page_index(val, nr_pages, &lo, &hi);
if (err) {
ret = err;
goto release_init_lock;
}
scan_slots_for_writeback(zram, mode, lo, hi, ctl);
continue;
}
if (!strcmp(param, "page_indexes")) {
err = parse_page_indexes(val, nr_pages, &lo, &hi);
if (err) {
ret = err;
goto release_init_lock;
}
scan_slots_for_writeback(zram, mode, lo, hi, ctl);
continue;
}
Powered by blists - more mailing lists