lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <dn5n5g7mo5bwiw5qgbxcvryjw3b3yz3lnukrfpsnmzpvykqpvh@73w6yfprtzkj>
Date: Tue, 25 Mar 2025 19:47:07 +0800
From: Coly Li <colyli@...nel.org>
To: Yu Kuai <yukuai1@...weicloud.com>
Cc: song@...nel.org, yukuai3@...wei.com, jgq516@...il.com, 
	linux-raid@...r.kernel.org, linux-kernel@...r.kernel.org, yi.zhang@...wei.com, 
	yangerkun@...wei.com
Subject: Re: [PATCH] md/raid10: fix missing discard IO accounting

On Tue, Mar 25, 2025 at 09:57:46AM +0800, Yu Kuai wrote:
> From: Yu Kuai <yukuai3@...wei.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@...wei.com>


Acked-by: Coly Li <colyli@...nel.org>

Thanks.

> ---
>  drivers/md/raid10.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> 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;
> -- 
> 2.39.2
> 
> 

-- 
Coly Li

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ