linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <senozhatsky@chromium.org>
To: Richard Chang <richardycc@google.com>
Cc: Sergey Senozhatsky <senozhatsky@chromium.org>,
	 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
Subject: Re: [PATCH] zram: modernize writeback interface
Date: Wed, 26 Mar 2025 17:15:28 +0900	[thread overview]
Message-ID: <iiav3vvvvu7lzcl3e2rzfh4kyz6kwymqurncjdsv62wvlge63k@ewgbdmzdnb2p> (raw)
In-Reply-To: <CALC_0q9hRAX=46Zd+qh5Pq1myXx+=9gSTT5hu7t1s_Ko4xd_Og@mail.gmail.com>

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.


  reply	other threads:[~2025-03-26  8:15 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 [this message]
2025-03-26  8:45           ` Sergey Senozhatsky
2025-03-26  9:31             ` Sergey Senozhatsky

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=iiav3vvvvu7lzcl3e2rzfh4kyz6kwymqurncjdsv62wvlge63k@ewgbdmzdnb2p \
    --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