Simple Optimization For Linux 7.4 Can Open Files For Reading ~39% Faster

Written by Michael Larabel in Linux Storage on 19 September 2026 at 12:28 PM EDT. 32 Comments
LINUX STORAGE
More than two years in the making, Linux 7.4 is poised to introduce a patch that amounts to a rather simple optimization to avoid unnecessary/duplicative work that can net some nice gains when opening files for reading.

Open-source developer Mateusz Guzik has been leading the effort to optimize the Linux kernel's do_open() VFS function used as part of opening files from a pathname lookup. Currently there is a duplicate directory entry "dentry" for translating the path component to the disk inode as part of the file opening process, which Guzik is optimizing out that duplicative dentry.

Guzik explained in the patch that went through five revisions in the past two years:
"Opening a file grabs a reference on the terminal dentry in __legitimize_path(), then another one in do_dentry_open() and finally drops the initial reference in terminate_walk().

That's 2 modifications which don't need to be there -- do_dentry_open() can consume the already held reference instead."

It ends up being a rather significant benefit to avoid that unnecessary work as benchmarking on a 20-core VM with a will-it-scale benchmark of opening the same file in read-only mode, the operations per second increased by 39%.

faster open file benchmark result


It's a bit surprising such low-hanging fruit was left in the Linux kernel this long. At least the improvement should be in the stable kernel before the end of 2026.

The three dozen lines of code patch is queued into VFS.git's vfs-7.4.lookup Git branch. With the patch now in a formal VFS subsystem Git branch and labeled as far as "7.4" material, look for this optimization to be submitted for the upcoming Linux 7.4 merge window.
Related News
About The Author

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week