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: Wed, 12 Nov 2025 14:57:44 +0800 [thread overview]
Message-ID: <tencent_17B2F3A0BCCBAFD3AE942235EE98F1595707@qq.com> (raw)
In-Reply-To: <htycvrcqbnkk7ldhpaqxesy7uhz3lssymwqm7nzkhyhnid3krm@mfju626njxvb>
On Wed, 12 Nov 2025 14:16:20 +0900, Sergey Senozhatsky wrote:
> The thing that I'm curious about is why does it help for flash storage?
> It's not a spinning disk, where seek times dominate the IO time.
1. For flash-based storage devices such as UFS and NVMe, the Command Queue
mechanism is implemented. Submitting multiple random write requests can
fully utilize the bandwidth of their buses.
2. When we submit consecutive pages separately instead of submitting them
continuously together, the write amplification problem is more likely to
occur. This is because there is an LBA (Logical Block Addressing) table in UFS.
3. Sequential writing has lower requirements for the bus bandwidth.
> My next question is: what problem do you solve with this? I mean,
> do you use it production (somewhere). If so, do you have a rough
> number of how many MiBs you writeback and how often, and what's the
> performance impact of this patch. Again, if you use it in production.
We haven't deployed this commit in the product yet. We're now deploying
it on mobile phones running the Android system. Our ideas are as follows:
1. When an app switches to the background, use process_madvise to swap out
the app's anonymous pages to zram. When the system is idle, cache the app
to the external UFS through the writeback interface.
2. When the system memory is tight and the IO load is low, use the IO load to
improve the memory release speed.
On Wed, 12 Nov 2025 14:18:01 +0900, Sergey Senozhatsky wrote:
> Why do you do this do-while loop here?
When there are no free zram_wb_request structures in the req_pool,
zram_writeback_next_request will return NULL. In this case, you need
to retry once to obtain a zram_wb_request.
next prev parent reply other threads:[~2025-11-12 6:58 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] zram: Implement multi-page write-back 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 [this message]
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
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_17B2F3A0BCCBAFD3AE942235EE98F1595707@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;
as well as URLs for NNTP newsgroup(s).