]> git.baikalelectronics.ru Git - kernel.git/commit
exfat: improve performance of exfat_free_cluster when using dirsync mount option
authorHyeongseok Kim <hyeongseok@gmail.com>
Mon, 1 Feb 2021 01:02:46 +0000 (10:02 +0900)
committerNamjae Jeon <namjae.jeon@samsung.com>
Mon, 22 Feb 2021 00:55:14 +0000 (09:55 +0900)
commitf65f425552e0db6c646bf900b8c35aa2474f090a
tree724e1eaf79e92ec72f0f5d47b315448c47d88504
parent2ec9e6ba5967f3bae151a01c4e3eaea9f070f07c
exfat: improve performance of exfat_free_cluster when using dirsync mount option

There are stressful update of cluster allocation bitmap when using
dirsync mount option which is doing sync buffer on every cluster bit
clearing. This could result in performance degradation when deleting
big size file.
Fix to update only when the bitmap buffer index is changed would make
less disk access, improving performance especially for truncate operation.

Testing with Samsung 256GB sdcard, mounted with dirsync option
(mount -t exfat /dev/block/mmcblk0p1 /temp/mount -o dirsync)

Remove 4GB file, blktrace result.
[Before] : 39 secs.
Total (blktrace):
 Reads Queued:      0,        0KiB   Writes Queued:      32775,    16387KiB
 Read Dispatches:   0,        0KiB   Write Dispatches:   32775,    16387KiB
 Reads Requeued:    0                Writes Requeued:        0
 Reads Completed:   0,        0KiB   Writes Completed:   32775,    16387KiB
 Read Merges:       0,        0KiB   Write Merges:           0,        0KiB
 IO unplugs:        2                Timer unplugs:          0

[After] : 1 sec.
Total (blktrace):
 Reads Queued:      0,        0KiB   Writes Queued:         13,        6KiB
 Read Dispatches:   0,        0KiB   Write Dispatches:      13,        6KiB
 Reads Requeued:    0                Writes Requeued:        0
 Reads Completed:   0,        0KiB   Writes Completed:      13,        6KiB
 Read Merges:       0,        0KiB   Write Merges:           0,        0KiB
 IO unplugs:        1                Timer unplugs:          0

Signed-off-by: Hyeongseok Kim <hyeongseok@gmail.com>
Acked-by: Sungjong Seo <sj1557.seo@samsung.com>
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
fs/exfat/balloc.c
fs/exfat/exfat_fs.h
fs/exfat/fatent.c