Re: [PATCH] md/raid5: set chunk_sectors to enable full stripe I/O splitting
"Yu Kuai" <[email protected]>
| Newsgroups | gmane.linux.raid,gmane.linux.kernel |
|---|---|
| Message-ID | <[email protected]> |
在 2026/2/23 11:58, Yu Kuai 写道: > Set chunk_sectors to the full stripe width (io_opt) so that the block > layer splits I/O at full stripe boundaries. This ensures that large > writes are aligned to full stripes, avoiding the read-modify-write > overhead that occurs with partial stripe writes in RAID-5/6. > > When chunk_sectors is set, the block layer's bio splitting logic in > get_max_io_size() uses blk_boundary_sectors_left() to limit I/O size > to the boundary. This naturally aligns split bios to full stripe > boundaries, enabling more efficient full stripe writes. > > Test results with 24-disk RAID5 (chunk_size=64k): > dd if=/dev/zero of=/dev/md0 bs=10M oflag=direct > Before: 461 MB/s > After: 520 MB/s (+12.8%) > > Suggested-by: Christoph Hellwig<[email protected]> > Signed-off-by: Yu Kuai<[email protected]> > --- > drivers/md/raid5.c | 1 + > 1 file changed, 1 insertion(+) Applied to md-7.0 -- Thansk, Kuai