[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7aec48ca-c7fa-df42-8a09-5dea9c762c2e@linux.dev>
Date: Mon, 24 Jul 2023 11:16:20 +0800
From: Guoqing Jiang <guoqing.jiang@...ux.dev>
To: Fengnan Chang <changfengnan@...edance.com>,
adilger.kernel@...ger.ca, tytso@....edu
Cc: linux-ext4@...r.kernel.org,
kernel test robot <oliver.sang@...el.com>
Subject: Re: [PATCH v2] ext4: improve discard efficiency
Hi,
On 7/19/23 17:36, Fengnan Chang wrote:
> In commit a015434480dc("ext4: send parallel discards on commit
> completions"), issue all discard commands in parallel make all
> bios could merged into one request, so lowlevel drive can issue
> multi segments in one time which is more efficiency, but commit
> 55cdd0af2bc5 ("ext4: get discard out of jbd2 commit kthread contex")
> seems broke this way, let's fix it.
> In my test, the time of fstrim fs with multi big sparse file
> reduce from 6.7s to 1.3s.
I tried with a 20T sparse file with latest kernel (6.5-rc2+ commit
f7e3a1baf).
truncate -s 20T sparse1.img
mkfs.ext4 sparse1.img
mount -o discard sparse1.img /mnt/
time fstrim /mnt
1. without the patch
[root@...alhost ~]# time fstrim /mnt
real 0m13.496s
user 0m0.002s
sys 0m5.202s
2. with the patch
[root@...alhost ~]# time fstrim /mnt
real 0m15.956s
user 0m0.000s
sys 0m7.251s
The result is different from your side, could you share your test?
Thanks,
Guoqing
Powered by blists - more mailing lists