From: "John Stoffel" <john@stoffel.org>
To: Yu Kuai <yukuai@fnnas.com>
Cc: linux-raid@vger.kernel.org, linan122@huawei.com, xni@redhat.com,
dan.carpenter@linaro.org
Subject: Re: [PATCH v5 00/12] md: align bio to io_opt for better performance
Date: Thu, 15 Jan 2026 18:38:09 -0500 [thread overview]
Message-ID: <26985.31329.553315.375744@quad.stoffel.home> (raw)
In-Reply-To: <20260114171241.3043364-1-yukuai@fnnas.com>
>>>>> "Yu" == Yu Kuai <yukuai@fnnas.com> writes:
> This patchset optimizes MD RAID performance by aligning bios to the
> optimal I/O size before splitting. When I/O is aligned to io_opt,
> raid5 can perform full stripe writes without needing to read extra
> data for parity calculation, significantly improving bandwidth.
> Patch 1: Fix a bug in raid5_run() error handling
> Patches 2-4: Cleanup - merge boolean fields into mddev_flags
> Patches 5-6: Preparation - use mempool for stripe_request_ctx and
> ensure max_sectors >= io_opt
> Patches 7-8: Core - add bio alignment infrastructure
> Patches 9-11: Enable bio alignment for raid5, raid10, and raid0
> Patch 12: Fix abnormal io_opt from member disks
> Performance improvement on 32-disk raid5 with 64kb chunk:
> dd if=/dev/zero of=/dev/md0 bs=100M oflag=direct
> Before: 782 MB/s
> After: 1.1 GB/s
My only comment is how is performance impacted at other block sizes?
And smaller RAID5 arrays? What about RAID6?
And more importantly, are random disk writes impacted? It's great
that you have gotten streaming direct writes faster, but have other
writes slowed down for the common case?
> Changes in v5:
> - Add patch 1 to fix raid5_run() returning success when log_init() fails
> - Patch 12: Fix stale commit message (remove mention of MD_STACK_IO_OPT flag)
> Changes in v4:
> - Patch 12: Simplify by checking rdev_is_mddev() first, remove
> MD_STACK_IO_OPT flag
> Changes in v3:
> - Patch 5: Remove unnecessary NULL check before mempool_destroy()
> - Patch 7: Use sector_div() instead of roundup()/rounddown() to fix
> 64-bit division issue on 32-bit platforms
> Changes in v2:
> - Fix mempool in patch 5
> - Add prep cleanup patches, 2-4
> - Add patch 12 to fix abnormal io_opt
> - Add Link tags to patches
> Yu Kuai (12):
> md/raid5: fix raid5_run() to return error when log_init() fails
> md: merge mddev has_superblock into mddev_flags
> md: merge mddev faillast_dev into mddev_flags
> md: merge mddev serialize_policy into mddev_flags
> md/raid5: use mempool to allocate stripe_request_ctx
> md/raid5: make sure max_sectors is not less than io_opt
> md: support to align bio to limits
> md: add a helper md_config_align_limits()
> md/raid5: align bio to io_opt
> md/raid10: align bio to io_opt
> md/raid0: align bio to io_opt
> md: fix abnormal io_opt from member disks
> drivers/md/md-bitmap.c | 4 +-
> drivers/md/md.c | 118 +++++++++++++++++++++++++++++++++++------
> drivers/md/md.h | 30 +++++++++--
> drivers/md/raid0.c | 6 ++-
> drivers/md/raid1-10.c | 5 --
> drivers/md/raid1.c | 13 ++---
> drivers/md/raid10.c | 10 ++--
> drivers/md/raid5.c | 95 +++++++++++++++++++++++----------
> drivers/md/raid5.h | 3 ++
> 9 files changed, 217 insertions(+), 67 deletions(-)
> --
> 2.51.0
prev parent reply other threads:[~2026-01-15 23:46 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-14 17:12 [PATCH v5 00/12] md: align bio to io_opt for better performance Yu Kuai
2026-01-14 17:12 ` [PATCH v5 01/12] md/raid5: fix raid5_run() to return error when log_init() fails Yu Kuai
2026-01-15 1:28 ` Li Nan
2026-01-15 2:29 ` Xiao Ni
2026-01-16 15:05 ` Christoph Hellwig
2026-01-14 17:12 ` [PATCH v5 02/12] md: merge mddev has_superblock into mddev_flags Yu Kuai
2026-01-16 15:06 ` Christoph Hellwig
2026-01-18 11:30 ` Yu Kuai
2026-01-14 17:12 ` [PATCH v5 03/12] md: merge mddev faillast_dev " Yu Kuai
2026-01-14 17:12 ` [PATCH v5 04/12] md: merge mddev serialize_policy " Yu Kuai
2026-01-14 17:12 ` [PATCH v5 05/12] md/raid5: use mempool to allocate stripe_request_ctx Yu Kuai
2026-01-14 17:12 ` [PATCH v5 06/12] md/raid5: make sure max_sectors is not less than io_opt Yu Kuai
2026-01-14 17:12 ` [PATCH v5 07/12] md: support to align bio to limits Yu Kuai
2026-01-16 15:08 ` Christoph Hellwig
2026-01-18 11:40 ` Yu Kuai
2026-01-19 6:47 ` Christoph Hellwig
2026-01-19 7:21 ` Yu Kuai
2026-01-19 7:27 ` Christoph Hellwig
2026-01-19 7:43 ` Yu Kuai
2026-01-19 8:27 ` Christoph Hellwig
2026-01-19 9:15 ` Yu Kuai
2026-01-14 17:12 ` [PATCH v5 08/12] md: add a helper md_config_align_limits() Yu Kuai
2026-01-14 17:12 ` [PATCH v5 09/12] md/raid5: align bio to io_opt Yu Kuai
2026-01-14 17:12 ` [PATCH v5 10/12] md/raid10: " Yu Kuai
2026-01-14 17:12 ` [PATCH v5 11/12] md/raid0: " Yu Kuai
2026-01-14 17:12 ` [PATCH v5 12/12] md: fix abnormal io_opt from member disks Yu Kuai
2026-01-16 15:08 ` Christoph Hellwig
2026-01-17 3:28 ` Coly Li
2026-01-19 6:48 ` Christoph Hellwig
2026-01-19 7:24 ` Yu Kuai
2026-01-19 8:36 ` Christoph Hellwig
2026-01-15 23:38 ` John Stoffel [this message]
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=26985.31329.553315.375744@quad.stoffel.home \
--to=john@stoffel.org \
--cc=dan.carpenter@linaro.org \
--cc=linan122@huawei.com \
--cc=linux-raid@vger.kernel.org \
--cc=xni@redhat.com \
--cc=yukuai@fnnas.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