mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yu Kuai <yukuai1@huaweicloud.com>
To: Yu Kuai <yukuai1@huaweicloud.com>, song@kernel.org, jgq516@gmail.com
Cc: 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 21:35:29 +0800	[thread overview]
Message-ID: <2ff3047e-3783-9511-e87a-8b406bcdcc31@huaweicloud.com> (raw)
In-Reply-To: <20250325015746.3195035-1-yukuai1@huaweicloud.com>

在 2025/03/25 9:57, Yu Kuai 写道:
> 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>
> ---
>   drivers/md/raid10.c | 1 +
>   1 file changed, 1 insertion(+)
> 
Applied to md-6.15
Thanks

> diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
> index 9d8516acf2fd..6ef65b4d1093 100644
> --- a/drivers/md/raid10.c
> +++ b/drivers/md/raid10.c
> @@ -1735,6 +1735,7 @@ static int raid10_handle_discard(struct mddev *mddev, struct bio *bio)
>   	 * The discard bio returns only first r10bio finishes
>   	 */
>   	if (first_copy) {
> +		md_account_bio(mddev, &bio);
>   		r10_bio->master_bio = bio;
>   		set_bit(R10BIO_Discard, &r10_bio->state);
>   		first_copy = false;
> 


      parent reply	other threads:[~2025-03-25 13:35 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
2025-03-25 11:47 ` Coly Li
2025-03-25 13:35 ` Yu Kuai [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=2ff3047e-3783-9511-e87a-8b406bcdcc31@huaweicloud.com \
    --to=yukuai1@huaweicloud.com \
    --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=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®