The File Struct Is Smaller In Linux 6.12 - May Help File Heavy Workloads
([Linux Kernel] 6 Hours Ago
Optimizing File Struct)
- Reference: 0001491915
- News link: https://www.phoronix.com/news/Linux-6.12-Shrinks-Struct-File
- Source link:
The file structure is one of the most widely-used data structures by Linux kernel drivers. The file struct represents an open file and thus obviously very important and ubiquitous throughout the kernel. With the Linux 6.12 kernel the file struct has been adjusted so it's smaller than before and in turn could help with performance for file-heavy workloads.
Christian Brauner submitted the VFS file improvements for the Linux 6.12 merge window which were already merged to Linux Git this morning by Linus Torvalds in Vienna. Brauner explains in [1]the pull request :
"This is the work to cleanup and shrink struct file significantly. You should've already seen most of the work in here.
Right now, ([focusing] on x86) struct file is 232 bytes. After this series struct file will be 184 bytes aka 3 cacheline and a spare 8 bytes for future extensions at the end of the struct.
With struct file being as ubiquitous as it is this should make a difference for file heavy workloads and allow further optimizations in the future."
That code has been merged. No benchmark performance numbers were noted on the merge request or in the actual patches of any quantified benefit to file-heavy workloads, but it will be interesting to see if the struct file savings do end up materializing with [2]Linux 6.12 .
[1] https://lore.kernel.org/lkml/20240913-vfs-file-53bf57c94647@brauner/
[2] https://www.phoronix.com/search/Linux+6.12
Christian Brauner submitted the VFS file improvements for the Linux 6.12 merge window which were already merged to Linux Git this morning by Linus Torvalds in Vienna. Brauner explains in [1]the pull request :
"This is the work to cleanup and shrink struct file significantly. You should've already seen most of the work in here.
Right now, ([focusing] on x86) struct file is 232 bytes. After this series struct file will be 184 bytes aka 3 cacheline and a spare 8 bytes for future extensions at the end of the struct.
With struct file being as ubiquitous as it is this should make a difference for file heavy workloads and allow further optimizations in the future."
That code has been merged. No benchmark performance numbers were noted on the merge request or in the actual patches of any quantified benefit to file-heavy workloads, but it will be interesting to see if the struct file savings do end up materializing with [2]Linux 6.12 .
[1] https://lore.kernel.org/lkml/20240913-vfs-file-53bf57c94647@brauner/
[2] https://www.phoronix.com/search/Linux+6.12
geerge