diff options
| author | Chi Zhiling <chizhiling@kylinos.cn> | 2026-03-03 11:14:08 +0800 |
|---|---|---|
| committer | Namjae Jeon <linkinjeon@kernel.org> | 2026-03-05 21:09:32 +0900 |
| commit | 636bd62299aea24684086d126ea88b23a6466f8e (patch) | |
| tree | 259f34a76d28626be13cdd599b9f52240ea082de /drivers/char/drm/git@git.tavy.me:linux.git | |
| parent | 63193eb4452d3bf5b2b71042c536cb51c7d786cb (diff) | |
exfat: optimize exfat_chain_cont_cluster with cached buffer heads
When converting files from NO_FAT_CHAIN to FAT_CHAIN format, profiling
reveals significant time spent in mark_buffer_dirty() and exfat_mirror_bh()
operations. This overhead occurs because each FAT entry modification
triggers a full block dirty marking and mirroring operation.
For consecutive clusters that reside in the same block, optimize by caching
the buffer head and performing dirty marking only once at the end of the
block's modifications.
Performance improvements for converting a 30GB file:
| Cluster Size | Before Patch | After Patch | Speedup |
|--------------|--------------|-------------|---------|
| 512 bytes | 4.243s | 1.866s | 2.27x |
| 4KB | 0.863s | 0.236s | 3.66x |
| 32KB | 0.069s | 0.034s | 2.03x |
| 256KB | 0.012s | 0.006s | 2.00x |
Signed-off-by: Chi Zhiling <chizhiling@kylinos.cn>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Diffstat (limited to 'drivers/char/drm/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
