Linux 7.4-rc2 Change Yields As Much As 162x Improvement For FAT32

In addition to a FAT32 optimization yielding as much as a 265x improvement that was merged for the Linux 7.4 cycle and separately another big FAT32 improvement expected for Linux 7.5, merged this week as part of the non-MM fixes for Linux 7.4-rc2 was another big FAT32 performance optimization. Open-source developer Matheus Alves de Almeida continues working on enhancing the FAT32 performance with the Linux FAT driver. The work merged this week is for pre-allocating space before expanding within the fat_cont_expand() function. He explained in the patch: "The fat_cont_expand() implementation leaves allocation of new clusters to generic_cont_expand_simple(). This path does many small cluster allocations, harming performance. Preallocate cluster space in fat_cont_expand(). Move preallocation to a new fat_preallocate() helper used by both fat_cont_expand() and fat_fallocate(FALLOC_FL_KEEP_SIZE). Use a FAT-specific fat_cont_expand_simple() instead of generic_cont_expand_simple() to avoid rechecking the new size after clusters have been allocated." The patch can deal some mighty nice improvements: The biggest impact from this optimization work is for FAT32 file-systems with small cluster sizes on synchronous mounts. "Most are OCFS2 fixes. These address extended-attribute corruption, missing attributes and kernel BUGs, along with crashes during cluster configuration, lock migration, recovery and unmount. Extent movement is also fixed to validate its range against a stable file size. Three FAT changes prevent a failed-write/FIBMAP race from spuriously making the filesystem read-only, correct directory link counts after rename, and speed up file expansion. The reported QEMU benchmarks show particularly large improvements on synchronous mounts. A taint-string fix prevents an out-of-bounds read which can expose slab contents in the kernel log. There are also build fixes for OpenRISC modules on CPUs without hardware multiply and for Clang 24." The work landed via the non-MM hotfixes pull request ahead of Linux 7.4-rc2 on Sunday.

Original Source

Read the full article at Phoronix →

KhanList aggregates and links to publicly available news content. We do not host full articles from third-party sources. Always verify important information with original sources.