On Thu, Feb 20, 2025 at 3:21 PM Yuezhang.Mo@xxxxxxxx <Yuezhang.Mo@xxxxxxxx> wrote: > > If the discard mount option is enabled, the file's clusters are > discarded when the clusters are freed. Discarding clusters one by > one will significantly reduce performance. Poor performance may > cause soft lockup when lots of clusters are freed. > > This commit improves performance by discarding contiguous clusters > in batches. > > Measure the performance by: > > # truncate -s 80G /mnt/file > # time rm /mnt/file > > Without this commit: > > real 4m46.183s > user 0m0.000s > sys 0m12.863s > > With this commit: > > real 0m1.661s > user 0m0.000s > sys 0m0.017s > > Signed-off-by: Yuezhang Mo <Yuezhang.Mo@xxxxxxxx> Applied 5 patches to #dev. Thanks!