linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yu Kuai <yukuai@kernel.org>
To: Coly Li <i@coly.li>, Christoph Hellwig <hch@lst.de>
Cc: Coly Li <colyli@kernel.org>,
	linux-raid@vger.kernel.org, linux-block@vger.kernel.org,
	Yu Kuai <yukuai3@huawei.com>, Xiao Ni <xni@redhat.com>,
	Hannes Reinecke <hare@suse.de>, Martin Wilck <mwilck@suse.com>,
	Keith Busch <kbusch@kernel.org>
Subject: Re: [RFC PATCH] md: split bio by io_opt size in md_submit_bio()
Date: Thu, 17 Jul 2025 00:29:27 +0800	[thread overview]
Message-ID: <284433c9-c11d-401f-8015-41faa9d0fde1@kernel.org> (raw)
In-Reply-To: <109C6212-FE63-4FD2-ACC3-F64C44C7D227@coly.li>

Hi,

在 2025/7/16 20:23, Coly Li 写道:
>
>> 2025年7月16日 20:17,Christoph Hellwig <hch@lst.de> 写道:
>>
>> On Wed, Jul 16, 2025 at 08:16:34PM +0800, Coly Li wrote:
>>>
>>>> 2025年7月16日 20:14,Christoph Hellwig <hch@lst.de> 写道:
>>>>
>>>> On Wed, Jul 16, 2025 at 08:10:33PM +0800, Coly Li wrote:
>>>>> Just like hanlding discard requests, handling raid5 read/write bios should
>>>>> try to split the large bio into opt_io_size aligned both *offset* and
>>>>> *length*. If I understand correctly, bio_split_to_limits() doesn't handle
>>>>> offset alignment for read5 read/write bios.
>>>> Well, if you want offset alignment, set chunk_sectors.
>>>>
>>> Do you mean setting max_hw_sectors as chunk_sectors?
>> Setting both to the desired value (full stipe width).
>>
> Do you mean setting chunk_size as (chunk_size * data_disks)?  This is deadlock…
>
> If opt_io_size is (chunk_size * data_disks), setting new max_hw_sectors as rounddown(current max_hw_sectors, opt_io_size) is good idea.

I think round down max_hw_sectors to io_opt(chunk_size * data_disks) 
will really
make things much easier, perhaps Christoph means this way. All you need 
to do is to
handle not aligned bio and split that part, and for aligned bio fall 
back to use
bio_split_to_limits().

Thanks,
Kuai
>
> Thanks.
>
> Coly Li
>
>


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

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-15 18:02 [RFC PATCH] md: split bio by io_opt size in md_submit_bio() colyli
2025-07-16  1:46 ` Yu Kuai
2025-07-16  6:58 ` Yu Kuai
2025-07-16  8:50   ` Coly Li
2025-07-16  9:30     ` Yu Kuai
2025-07-16 11:37 ` Christoph Hellwig
     [not found]   ` <437E98DD-7D64-49BF-9F2C-04CB0A142A88@coly.li>
2025-07-16 11:41     ` Christoph Hellwig
2025-07-16 11:44       ` Coly Li
2025-07-16 11:45         ` Christoph Hellwig
2025-07-16 12:10           ` Coly Li
2025-07-16 12:14             ` Christoph Hellwig
     [not found]               ` <DE36C995-4014-44DC-A998-1C4FF9AFD7F9@coly.li>
2025-07-16 12:17                 ` Christoph Hellwig
2025-07-16 12:23                   ` Coly Li
2025-07-16 16:29                     ` Yu Kuai [this message]
2025-07-17  4:52                       ` Christoph Hellwig
2025-07-17 15:19                         ` Coly Li
  -- strict thread matches above, loose matches on Subject: below --
2025-07-15 17:59 colyli

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=284433c9-c11d-401f-8015-41faa9d0fde1@kernel.org \
    --to=yukuai@kernel.org \
    --cc=colyli@kernel.org \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=i@coly.li \
    --cc=kbusch@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=mwilck@suse.com \
    --cc=xni@redhat.com \
    --cc=yukuai3@huawei.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;
as well as URLs for NNTP newsgroup(s).