From: Wenchao Chen <wenchao.chen@unisoc.com>
To: <ulf.hansson@linaro.org>
Cc: <linux-mmc@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<wenchao.chen666@gmail.com>, <zhenxiong.lai@unisoc.com>,
<yuelin.tang@unisoc.com>, Wenchao Chen <wenchao.chen@unisoc.com>
Subject: [PATCH V3 0/2] mmc: hsq: dynamically adjust hsq_depth to improve performance
Date: Tue, 29 Aug 2023 10:04:49 +0800 [thread overview]
Message-ID: <20230829020451.9828-1-wenchao.chen@unisoc.com> (raw)
Change in v3:
- Use "mrq->data->blksz * mrq->data->blocks == 4096" for 4K.
- Add explanation for "HSQ_PERFORMANCE_DEPTH".
Change in v2:
- Support for dynamic adjustment of hsq_depth.
Test
=====
I tested 3 times for each case and output a average speed.
Ran 'fio' to evaluate the performance:
1.Fixed hsq_depth
1) Sequential write:
Speed: 168 164 165
Average speed: 165.67MB/S
2) Sequential read:
Speed: 326 326 326
Average speed: 326MB/S
3) Random write:
Speed: 82.6 83 83
Average speed: 82.87MB/S
4) Random read:
Speed: 48.2 48.3 47.6
Average speed: 48.03MB/S
2.Dynamic hsq_depth
1) Sequential write:
Speed: 167 166 166
Average speed: 166.33MB/S
2) Sequential read:
Speed: 327 326 326
Average speed: 326.3MB/S
3) Random write:
Speed: 86.1 86.2 87.7
Average speed: 86.67MB/S
4) Random read:
Speed: 48.1 48 48
Average speed: 48.03MB/S
Based on the above data, dynamic hsq_depth can improve the performance of random writes.
Random write improved by 4.6%.
In addition, we tested 8K and 16K.
1.Fixed hsq_depth
1) Random write(bs=8K):
Speed: 116 114 115
Average speed: 115MB/S
2) Random read(bs=8K):
Speed: 83 83 82.5
Average speed: 82.8MB/S
3) Random write(bs=16K):
Speed: 141 142 141
Average speed: 141.3MB/S
4) Random read(bs=16K):
Speed: 132 132 132
Average speed: 132MB/S
2.Dynamic hsq_depth(mrq->data->blksz * mrq->data->blocks == 8192 or 16384)
1) Random write(bs=8K):
Speed: 115 115 115
Average speed: 115MB/S
2) Random read(bs=8K):
Speed: 82.7 82.9 82.8
Average speed: 82.8MB/S
3) Random write(bs=16K):
Speed: 143 141 141
Average speed: 141.6MB/S
4) Random read(bs=16K):
Speed: 132 132 132
Average speed: 132MB/S
Increasing hsq_depth cannot improve 8k and 16k random read/write performance.
To reduce latency, we dynamically increase hsq_depth only for 4k random writes.
Test cmd
=========
1)write: fio -filename=/dev/mmcblk0p72 -direct=1 -rw=write -bs=512K -size=512M -group_reporting -name=test -numjobs=8 -thread -iodepth=64
2)read: fio -filename=/dev/mmcblk0p72 -direct=1 -rw=read -bs=512K -size=512M -group_reporting -name=test -numjobs=8 -thread -iodepth=64
3)randwrite: fio -filename=/dev/mmcblk0p72 -direct=1 -rw=randwrite -bs=4K -size=512M -group_reporting -name=test -numjobs=8 -thread -iodepth=64
4)randread: fio -filename=/dev/mmcblk0p72 -direct=1 -rw=randread -bs=4K -size=512M -group_reporting -name=test -numjobs=8 -thread -iodepth=64
5)randwrite: fio -filename=/dev/mmcblk0p72 -direct=1 -rw=randwrite -bs=8K -size=512M -group_reporting -name=test -numjobs=8 -thread -iodepth=64
6)randread: fio -filename=/dev/mmcblk0p72 -direct=1 -rw=randread -bs=8K -size=512M -group_reporting -name=test -numjobs=8 -thread -iodepth=64
7)randwrite: fio -filename=/dev/mmcblk0p72 -direct=1 -rw=randwrite -bs=16K -size=512M -group_reporting -name=test -numjobs=8 -thread -iodepth=64
8)randread: fio -filename=/dev/mmcblk0p72 -direct=1 -rw=randread -bs=16K -size=512M -group_reporting -name=test -numjobs=8 -thread -iodepth=64
Wenchao Chen (2):
mmc: queue: replace immediate with hsq->depth
mmc: hsq: dynamic adjustment of hsq->depth
drivers/mmc/core/queue.c | 6 +-----
drivers/mmc/host/mmc_hsq.c | 28 ++++++++++++++++++++++++++++
drivers/mmc/host/mmc_hsq.h | 11 +++++++++++
include/linux/mmc/host.h | 1 +
4 files changed, 41 insertions(+), 5 deletions(-)
--
2.17.1
next reply other threads:[~2023-08-29 2:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-29 2:04 Wenchao Chen [this message]
2023-08-29 2:04 ` [PATCH V3 1/2] mmc: queue: replace immediate with hsq->depth Wenchao Chen
2023-08-29 2:04 ` [PATCH V3 2/2] mmc: hsq: dynamic adjustment of hsq->depth Wenchao Chen
2023-09-14 12:57 ` Ulf Hansson
2023-09-15 11:38 ` Wenchao 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=20230829020451.9828-1-wenchao.chen@unisoc.com \
--to=wenchao.chen@unisoc.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=ulf.hansson@linaro.org \
--cc=wenchao.chen666@gmail.com \
--cc=yuelin.tang@unisoc.com \
--cc=zhenxiong.lai@unisoc.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