public inbox for linux-raid@vger.kernel.org
 help / color / mirror / Atom feed
From: "Yu Kuai" <yukuai@fnnas.com>
To: "Christoph Hellwig" <hch@infradead.org>
Cc: <linux-raid@vger.kernel.org>, <linan122@huawei.com>,
	<xni@redhat.com>,  <dan.carpenter@linaro.org>, <yukuai@fnnas.com>
Subject: Re: [PATCH v5 07/12] md: support to align bio to limits
Date: Mon, 19 Jan 2026 15:43:34 +0800	[thread overview]
Message-ID: <8b44bd64-efc8-428a-ad2f-9a9fcda786a1@fnnas.com> (raw)
In-Reply-To: <aW3cxxnbRmon9aYJ@infradead.org>

在 2026/1/19 15:27, Christoph Hellwig 写道:

> On Mon, Jan 19, 2026 at 03:21:14PM +0800, Yu Kuai wrote:
>> 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.
> What do you mean with "necessary for small IO"?

io_min and io_opt is quite similar in mdraid, IO aligned with io_opt can get the best
bandwidth, and IO aligned with io_min can get the best iops. Currently chunk_sectors
is the same as io_min, and bio_split_rw() will try to align IO to io_min. I don't think
we want to remove this behavior.

>
-- 
Thansk,
Kuai

  reply	other threads:[~2026-01-19  7:43 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 [this message]
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

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=8b44bd64-efc8-428a-ad2f-9a9fcda786a1@fnnas.com \
    --to=yukuai@fnnas.com \
    --cc=dan.carpenter@linaro.org \
    --cc=hch@infradead.org \
    --cc=linan122@huawei.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=xni@redhat.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