From: Paul Menzel <pmenzel@molgen.mpg.de>
To: Kuai Yu <yukuai1@huaweicloud.com>,
Paul E Luse <paul.e.luse@linux.intel.com>
Cc: song@kernel.org, neilb@suse.com, shli@fb.com,
linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org,
yukuai3@huawei.com, yi.zhang@huawei.com, yangerkun@huawei.com
Subject: Re: [PATCH md-6.9 00/10] md/raid1: refactor read_balance() and some minor fix
Date: Thu, 22 Feb 2024 09:40:07 +0100 [thread overview]
Message-ID: <34b04a5f-7ef8-4e00-b1c6-c4e692281499@molgen.mpg.de> (raw)
In-Reply-To: <20240222075806.1816400-1-yukuai1@huaweicloud.com>
Dear Kuai, dear Paul,
Thank you for your work. Some nits and request for benchmarks below.
Am 22.02.24 um 08:57 schrieb Yu Kuai:
> From: Yu Kuai <yukuai3@huawei.com>
>
> The orignial idea is that Paul want to optimize raid1 read
original
> performance([1]), however, we think that the orignial code for
original
> read_balance() is quite complex, and we don't want to add more
> complexity. Hence we decide to refactor read_balance() first, to make
> code cleaner and easier for follow up.
>
> Before this patchset, read_balance() has many local variables and many
> braches, it want to consider all the scenarios in one iteration. The
branches
> idea of this patch is to devide them into 4 different steps:
divide
> 1) If resync is in progress, find the first usable disk, patch 5;
> Otherwise:
> 2) Loop through all disks and skipping slow disks and disks with bad
> blocks, choose the best disk, patch 10. If no disk is found:
> 3) Look for disks with bad blocks and choose the one with most number of
> sectors, patch 8. If no disk is found:
> 4) Choose first found slow disk with no bad blocks, or slow disk with
> most number of sectors, patch 7.
>
> Note that step 3) and step 4) are super code path, and performance
> should not be considered.
>
> And after this patchset, we'll continue to optimize read_balance for
> step 2), specifically how to choose the best rdev to read.
Is there a change in performance with the current patch set? Is radi1
well enough covered by the test suite?
Kind regards,
Paul
> [1] https://lore.kernel.org/all/20240102125115.129261-1-paul.e.luse@linux.intel.com/
>
> Yu Kuai (10):
> md: add a new helper rdev_has_badblock()
> md: record nonrot rdevs while adding/removing rdevs to conf
> md/raid1: fix choose next idle in read_balance()
> md/raid1-10: add a helper raid1_check_read_range()
> md/raid1-10: factor out a new helper raid1_should_read_first()
> md/raid1: factor out read_first_rdev() from read_balance()
> md/raid1: factor out choose_slow_rdev() from read_balance()
> md/raid1: factor out choose_bb_rdev() from read_balance()
> md/raid1: factor out the code to manage sequential IO
> md/raid1: factor out helpers to choose the best rdev from
> read_balance()
>
> drivers/md/md.c | 28 ++-
> drivers/md/md.h | 12 ++
> drivers/md/raid1-10.c | 69 +++++++
> drivers/md/raid1.c | 454 ++++++++++++++++++++++++------------------
> drivers/md/raid10.c | 66 ++----
> drivers/md/raid5.c | 35 ++--
> 6 files changed, 402 insertions(+), 262 deletions(-)
next prev parent reply other threads:[~2024-02-22 8:41 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-22 7:57 Yu Kuai
2024-02-22 7:57 ` [PATCH md-6.9 01/10] md: add a new helper rdev_has_badblock() Yu Kuai
2024-02-26 9:01 ` Xiao Ni
2024-02-22 7:57 ` [PATCH md-6.9 02/10] md: record nonrot rdevs while adding/removing rdevs to conf Yu Kuai
2024-02-26 13:12 ` Xiao Ni
2024-02-26 13:25 ` Yu Kuai
2024-02-26 13:27 ` Xiao Ni
2024-02-22 7:57 ` [PATCH md-6.9 03/10] md/raid1: fix choose next idle in read_balance() Yu Kuai
2024-02-26 8:55 ` Xiao Ni
2024-02-26 9:12 ` Yu Kuai
2024-02-26 9:24 ` Xiao Ni
2024-02-26 9:40 ` Yu Kuai
2024-02-26 13:20 ` Xiao Ni
2024-02-27 2:23 ` Xiao Ni
2024-02-27 2:38 ` Yu Kuai
2024-02-27 4:49 ` Xiao Ni
2024-02-27 14:26 ` Luse, Paul E
2024-02-22 7:58 ` [PATCH md-6.9 04/10] md/raid1-10: add a helper raid1_check_read_range() Yu Kuai
2024-02-26 9:15 ` Xiao Ni
2024-02-22 7:58 ` [PATCH md-6.9 05/10] md/raid1-10: factor out a new helper raid1_should_read_first() Yu Kuai
2024-02-26 13:46 ` Xiao Ni
2024-02-22 7:58 ` [PATCH md-6.9 06/10] md/raid1: factor out read_first_rdev() from read_balance() Yu Kuai
2024-02-26 14:16 ` Xiao Ni
2024-02-27 1:06 ` Yu Kuai
2024-02-27 1:23 ` Xiao Ni
2024-02-27 1:42 ` Xiao Ni
2024-02-27 1:43 ` Yu Kuai
2024-02-27 2:50 ` Xiao Ni
2024-02-27 2:50 ` Xiao Ni
2024-02-22 7:58 ` [PATCH md-6.9 07/10] md/raid1: factor out choose_slow_rdev() " Yu Kuai
2024-02-26 14:44 ` Xiao Ni
2024-02-22 7:58 ` [PATCH md-6.9 08/10] md/raid1: factor out choose_bb_rdev() " Yu Kuai
2024-02-27 1:50 ` Xiao Ni
2024-02-22 7:58 ` [PATCH md-6.9 09/10] md/raid1: factor out the code to manage sequential IO Yu Kuai
2024-02-27 2:04 ` Xiao Ni
2024-02-22 7:58 ` [PATCH md-6.9 10/10] md/raid1: factor out helpers to choose the best rdev from read_balance() Yu Kuai
2024-02-27 4:47 ` Xiao Ni
2024-02-22 8:40 ` Paul Menzel [this message]
2024-02-22 9:08 ` [PATCH md-6.9 00/10] md/raid1: refactor read_balance() and some minor fix Yu Kuai
2024-02-22 13:04 ` Luse, Paul E
2024-02-22 15:30 ` Paul Menzel
2024-02-27 0:27 ` Song Liu
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=34b04a5f-7ef8-4e00-b1c6-c4e692281499@molgen.mpg.de \
--to=pmenzel@molgen.mpg.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=neilb@suse.com \
--cc=paul.e.luse@linux.intel.com \
--cc=shli@fb.com \
--cc=song@kernel.org \
--cc=yangerkun@huawei.com \
--cc=yi.zhang@huawei.com \
--cc=yukuai1@huaweicloud.com \
--cc=yukuai3@huawei.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
all inboxes | Powered by JetHome®