Re: [PATCH v5 07/12] md: support to align bio to limits
"Yu Kuai" <[email protected]>
| Newsgroups | gmane.linux.raid |
|---|---|
| Message-ID | <[email protected]> |
Hi, 在 2026/1/16 23:08, Christoph Hellwig 写道: > On Thu, Jan 15, 2026 at 01:12:35AM +0800, Yu Kuai wrote: >> For personalities that report optimal IO size, it indicates that users >> can get the best IO bandwidth if they issue IO with this size. However >> there is also an implicit condition that IO should also be aligned to the >> optimal IO size. >> >> Currently, bio will only be split by limits, if bio offset is not aligned >> to limits, then all split bio will not be aligned. This patch add a new >> feature to align bio to limits first, and following patches will support >> this for each personality if necessary. > This feels a bit odd and mixes up different things as right now > nothing in the block layer splits to the opt_io size. If you want > a boundary that is split on, the chunk_size limit seems to be what > you want, and the existing code would do the work based on that. No, the chunk_sectors and io_opt are different, and align io to io_opt is not a general idea, for now this is the only requirement in mdraid. Not sure if you remembered, Coly used to send a version to align IO to io_opt separately, and we discussed and both agree align max_sectors to io_opt and then align io to max_sectors in mdraid is better. For now, current setting of max_sectors, and split IO to max_sectors does not make much sense for raid0/10/456. > -- Thansk, Kuai