Linux XFS filesystem development
 help / color / mirror / Atom feed
From: Tony Battersby <tonyb@cybernetics.com>
To: yukuai@kernel.org, Song Liu <song@kernel.org>,
	Yu Kuai <yukuai3@huawei.com>,
	Christian Brauner <brauner@kernel.org>,
	"Darrick J. Wong" <djwong@kernel.org>,
	"Matthew Wilcox (Oracle)" <willy@infradead.org>
Cc: linux-raid@vger.kernel.org, linux-xfs@vger.kernel.org,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] md/raid0,raid4,raid5,raid6,raid10: fix bogus io_opt value
Date: Tue, 29 Jul 2025 17:49:07 -0400	[thread overview]
Message-ID: <b6af511e-9128-4775-8994-9bbaef3465a2@cybernetics.com> (raw)
In-Reply-To: <3660751f-e230-498c-b857-99d61fe442e6@kernel.org>

On 7/29/25 12:56, Yu Kuai wrote:
> Hi,
>
> 在 2025/7/30 0:12, Tony Battersby 写道:
>> md-raid currently sets io_min and io_opt to the RAID chunk and stripe
>> sizes and then calls queue_limits_stack_bdev() to combine the io_min and
>> io_opt values with those of the component devices.  The io_opt size is
>> notably combined using the least common multiple (lcm), which does not
>> work well in practice for some drives (1), resulting in overflow or
>> unreasonable values.
>>
>> dm-raid, on the other hand, sets io_min and io_opt through the
>> raid_io_hints() function, which is called after stacking all the queue
>> limits of the component drives, so the RAID chunk and stripe sizes
>> override the values of the stacking.
>>
>> Change md-raid to be more like dm-raid by setting io_min and io_opt to
>> the RAID chunk and stripe sizes after stacking the queue limits of the
>> component devies.  This fixes /sys/block/md0/queue/optimal_io_size from
>> being a bogus value like 3221127168 to being the correct RAID stripe
>> size.
> This is already discussed, and mtp3sas should fix this strange value.

Thanks, I will follow that ongoing discussion.

https://lore.kernel.org/all/ywsfp3lqnijgig6yrlv2ztxram6ohf5z4yfeebswjkvp2dzisd@f5ikoyo3sfq5/


      reply	other threads:[~2025-07-29 21:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-29 16:12 [PATCH 1/2] md/raid0,raid4,raid5,raid6,raid10: fix bogus io_opt value Tony Battersby
2025-07-29 16:56 ` Yu Kuai
2025-07-29 21:49   ` Tony Battersby [this message]

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=b6af511e-9128-4775-8994-9bbaef3465a2@cybernetics.com \
    --to=tonyb@cybernetics.com \
    --cc=brauner@kernel.org \
    --cc=djwong@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=song@kernel.org \
    --cc=willy@infradead.org \
    --cc=yukuai3@huawei.com \
    --cc=yukuai@kernel.org \
    /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