From: Sergey Senozhatsky <senozhatsky@chromium.org>
To: Richard Chang <richardycc@google.com>
Cc: Minchan Kim <minchan@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Brian Geffon <bgeffon@google.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Sergey Senozhatsky <senozhatsky@chromium.org>
Subject: Re: [PATCH] zram: modernize writeback interface
Date: Wed, 26 Mar 2025 18:31:14 +0900 [thread overview]
Message-ID: <oc53hpg3st6v3okm5nbaolx6wpnw5tgsat2g4ycgkzze4yxwdv@7brgfyi7jynh> (raw)
In-Reply-To: <awuyw4jfm2nwxxunchaxazc27m6gqkcyn7zx4gkin7fqg3ogrc@uq55swn7atrx>
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;
}
prev parent reply other threads:[~2025-03-26 9:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-25 3:42 Sergey Senozhatsky
2025-03-25 21:52 ` Minchan Kim
2025-03-26 4:03 ` Richard Chang
2025-03-26 4:16 ` Sergey Senozhatsky
2025-03-26 7:07 ` Richard Chang
2025-03-26 8:15 ` Sergey Senozhatsky
2025-03-26 8:45 ` Sergey Senozhatsky
2025-03-26 9:31 ` Sergey Senozhatsky [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=oc53hpg3st6v3okm5nbaolx6wpnw5tgsat2g4ycgkzze4yxwdv@7brgfyi7jynh \
--to=senozhatsky@chromium.org \
--cc=akpm@linux-foundation.org \
--cc=bgeffon@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=minchan@kernel.org \
--cc=richardycc@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox