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/19 14:47, Christoph Hellwig 写道: > On Sun, Jan 18, 2026 at 07:40:23PM +0800, Yu Kuai wrote: >> 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. > The chunk size was added for (hardware) devices that require I/O split at > a fixed granularity for performance reasons. Which seems to e exactly > what you want here. > > This has nothing to do with max_sectors. For example, 32 disks raid5 array with chunksize=64k, currently the queue limits are: chunk_sectors = 64k io_min = 64k io_opt = 64 * 31k max_sectors = 1M It's correct to split I/O at 64k boundary to avoid performance issues, however split at 64 *31k boundary is what we want to get best bandwidth. So, if we simply changes chunk_sectors to 64 * 31k, it will be incorrect, because 64k boundary is still necessary for small IO. So I'm not quite sure, are you suggesting following solution? Add a max_chunk_sectors, and in this case it'll be 64 * 31k, for I/O: 1) First check and split to chunk_sectors boundary; 2) If I/O is already aligned to chunk_sectors, then check and split to max_chunk_sectors boundary(BTW, this is what this set trying to do); > -- Thansk, Kuai