public inbox for linux-raid@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 00/12] md: align bio to io_opt for better performance
@ 2026-01-14 17:12 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
                   ` (12 more replies)
  0 siblings, 13 replies; 32+ messages in thread
From: Yu Kuai @ 2026-01-14 17:12 UTC (permalink / raw)
  To: linux-raid; +Cc: yukuai, linan122, xni, dan.carpenter

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

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


^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2026-01-19  9:15 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH v5 00/12] md: align bio to io_opt for better performance John Stoffel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox