linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Yuwen Chen <ywen.chen@foxmail.com>
To: senozhatsky@chromium.org
Cc: akpm@linux-foundation.org, axboe@kernel.dk, bgeffon@google.com,
	licayy@outlook.com, linux-block@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	liumartin@google.com, minchan@kernel.org, richardycc@google.com,
	ywen.chen@foxmail.com
Subject: Re: [PATCH v4] zram: Implement multi-page write-back
Date: Thu, 13 Nov 2025 15:55:20 +0800	[thread overview]
Message-ID: <tencent_FE5751D11BB7EC389B2BC0B957DEE0D75E06@qq.com> (raw)
In-Reply-To: <x6ksirxv2xffhzpvdxmm5fa7r4b56mlh3kbhopljdsvwzg62wm@rrsslefk4rb4>

On Thu, 13 Nov 2025 11:04:04 +0900, Sergey Senozhatsky wrote:
> How was this number chosen?  Did you try lower/higher values?
> I think we might want this to be runtime tunable via sysfs, e.g.
> writeback_batch_size attr, with min value of 1.

I haven't conducted any tests on this value. I just set an empirical
value of 32 based on the submission queue length of the storage device.

As you said, providing a sys node for configuration might offer
performance advantages for mechanical hard drives.

On Thu, 13 Nov 2025 11:20:15 +0900, Sergey Senozhatsky wrote:
> So I wonder if things will look simpler (is this the word I'm looking
> for?) if you just have two lists for requests: one list for completed/idle
> requests and one list for in-flight requests (and you move requests
> around accordingly).  Then you don't need to iterate the pool and check
> flags, you just can check list_empty(&idle_requests) and take the first
> (front) element.

Yes, using two linked lists can reduce the complexity. It's just that
before I saw your submission, I couldn't find a better way to avoid
introducing locks. Thank you very much!



  parent reply	other threads:[~2025-11-13  7:55 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <tencent_78FC2C4FE16BA1EBAF0897DB60FCD675ED05@qq.com>
2025-11-05  3:33 ` [PATCH v2] " Yuwen Chen
2025-11-05  6:48   ` [PATCH v3] " Yuwen Chen
2025-11-05 15:25     ` Jens Axboe
2025-11-06  1:49       ` [PATCH v4] " Yuwen Chen
2025-11-10  4:49         ` Sergey Senozhatsky
2025-11-10  7:16           ` Yuwen Chen
2025-11-12  5:16             ` Sergey Senozhatsky
2025-11-12  5:18         ` Sergey Senozhatsky
2025-11-12  6:57           ` Yuwen Chen
2025-11-13  2:04         ` Sergey Senozhatsky
2025-11-13  5:10           ` Sergey Senozhatsky
2025-11-13  2:11         ` Sergey Senozhatsky
2025-11-13  2:20         ` Sergey Senozhatsky
2025-11-13  4:44           ` Sergey Senozhatsky
2025-11-13  7:55           ` Yuwen Chen [this message]
2025-11-13  5:40         ` Minchan Kim
2025-11-13  6:03           ` Sergey Senozhatsky
2025-11-13  8:27             ` Yuwen Chen
2025-11-13  7:37         ` Sergey Senozhatsky
2025-11-13  7:55         ` Sergey Senozhatsky
2025-11-06  2:28       ` [PATCH v3] " Yuwen Chen

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=tencent_FE5751D11BB7EC389B2BC0B957DEE0D75E06@qq.com \
    --to=ywen.chen@foxmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=axboe@kernel.dk \
    --cc=bgeffon@google.com \
    --cc=licayy@outlook.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=liumartin@google.com \
    --cc=minchan@kernel.org \
    --cc=richardycc@google.com \
    --cc=senozhatsky@chromium.org \
    /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