From: Coly Li <i@coly.li>
To: Yu Kuai <yukuai1@huaweicloud.com>
Cc: Coly Li <colyli@kernel.org>,
song@kernel.org, jgq516@gmail.com, linux-raid@vger.kernel.org,
linux-kernel@vger.kernel.org, yi.zhang@huawei.com,
yangerkun@huawei.com, "yukuai (C)" <yukuai3@huawei.com>
Subject: Re: [PATCH] md/raid10: fix missing discard IO accounting
Date: Tue, 25 Mar 2025 19:48:24 +0800 [thread overview]
Message-ID: <761DA302-0E21-4CDD-ACCE-85958DBD48D5@coly.li> (raw)
In-Reply-To: <36f1f74b-4376-89f3-0690-09f36e05d6e1@huaweicloud.com>
> 2025年3月25日 15:27,Yu Kuai <yukuai1@huaweicloud.com> 写道:
>
> Hi,
>
> 在 2025/03/25 15:04, Coly Li 写道:
>> On Tue, Mar 25, 2025 at 09:57:46AM +0800, Yu Kuai wrote:
>>> From: Yu Kuai <yukuai3@huawei.com>
>>>
>>> md_account_bio() is not called from raid10_handle_discard(), now that we
>>> handle bitmap inside md_account_bio(), also fix missing
>>> bitmap_startwrite for discard.
>>>
>>> Test whole disk discard for 20G raid10:
>>>
>>> Before:
>>> Device d/s dMB/s drqm/s %drqm d_await dareq-sz
>>> md0 48.00 16.00 0.00 0.00 5.42 341.33
>>>
>>> After:
>>> Device d/s dMB/s drqm/s %drqm d_await dareq-sz
>>> md0 68.00 20462.00 0.00 0.00 2.65 308133.65
>>>
>>> Fixes: 528bc2cf2fcc ("md/raid10: enable io accounting")
>>> Signed-off-by: Yu Kuai <yukuai3@huawei.com>
>> Should we treat discard request as real I/O?
>> Normally IMHO discard request should not be counted as real data transfer,
>> correct me if I am wrong.
>
> Normally it's not, that's why discard IOs are accounted separately in
> the block layer.
>
> Also notice that discard should be treated as write, because after
> discard, reading will get zero data.
I see, it is for the separated discard counting. Sure, I reply my Acked-by on the original patch.
Thank you for the explanation.
Coly Li
next prev parent reply other threads:[~2025-03-25 12:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-25 1:57 Yu Kuai
2025-03-25 7:04 ` Coly Li
2025-03-25 7:27 ` Yu Kuai
2025-03-25 11:48 ` Coly Li [this message]
2025-03-25 11:47 ` Coly Li
2025-03-25 13:35 ` Yu Kuai
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=761DA302-0E21-4CDD-ACCE-85958DBD48D5@coly.li \
--to=i@coly.li \
--cc=colyli@kernel.org \
--cc=jgq516@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=song@kernel.org \
--cc=yangerkun@huawei.com \
--cc=yi.zhang@huawei.com \
--cc=yukuai1@huaweicloud.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
all inboxes | Powered by JetHome®