News report

Linux 7.4 VFS Patch Speeds Up File Opens by 39% in One Test

A Linux VFS optimization queued for the 7.4 cycle removes a redundant dentry reference cycle and raised read-only file-open throughput by 39% in its targeted benchmark.

On this page
  1. A small VFS change produced a large microbenchmark result
  2. What the patch actually removes
  3. High-core-count workloads have the clearest reason to care
  4. It is queued for Linux 7.4, not yet a stable-kernel guarantee

A small VFS change produced a large microbenchmark result

A Linux Virtual File System optimization queued for the Linux 7.4 development cycle removes an unnecessary reference-counting round trip from a common file-open path. In developer Mateusz Guzik’s targeted will-it-scale test, opening the same file read-only on a 20-core virtual machine increased from 4,043,375 to 5,629,378 operations per second — a 39% gain.

The result is striking because the patch is not a new filesystem, scheduler or storage driver. It changes how an already-held terminal dentry reference is handed into the file-opening path, avoiding a second reference acquisition followed by dropping the first one. That cuts synchronization work from a very hot kernel operation.

The benchmark reported with the VFS patch
Test stateFile opens per second
Before patch4,043,375 ops/s
After patch5,629,378 ops/s
Measured change+39%
Test setup20-core VM; will-it-scale; same file opened read-only

What the patch actually removes

During pathname lookup, the existing path acquires a reference to the terminal dentry in __legitimize_path(). The normal open path then takes another reference in do_dentry_open(), before terminate_walk() releases the original reference. Guzik’s patch changes the common case so do_dentry_open() can consume the reference that is already held instead of performing that redundant ref/unref cycle.

That distinction is useful when interpreting the benchmark. The optimization is reducing kernel bookkeeping around file opening; it is not making an SSD 39% faster, increasing filesystem read bandwidth by 39%, or reducing every application’s runtime by 39%. Workloads dominated by other costs can see a much smaller end-to-end difference.

High-core-count workloads have the clearest reason to care

Reference-count modifications can become disproportionately expensive when many CPU cores contend on the same cache line. Removing two unnecessary modifications from a common operation can therefore matter most when many threads are opening files concurrently. Build systems, package tooling, servers, container-heavy environments and metadata-intensive developer workloads are plausible beneficiaries, but the patch’s published benchmark does not establish a specific application-level gain for any of them.

For desktop users, the practical effect may be difficult to notice in ordinary launches where file opening is only one piece of the workload. The more important technical point is that the optimization sits in the VFS layer rather than being tied to one storage device or one specific on-disk filesystem.

It is queued for Linux 7.4, not yet a stable-kernel guarantee

The patch has gone through multiple revisions over more than two years and is now queued in the VFS vfs-7.4.lookup branch for the Linux 7.4 cycle. That is a meaningful upstream milestone, but it is not the same as the change already shipping in a stable Linux 7.4 release or in current distributions.

The next evidence to watch is the Linux 7.4 merge window and broader benchmarking once the change reaches mainline. Those tests will show whether removing the dentry reference cycle produces measurable improvements outside the deliberately file-open-heavy benchmark that motivated the patch.

Sources

Primary and technical sources

These sources support the reporting and analysis above. Current stories are updated when later evidence materially changes the facts.

  1. 01 Linux Kernel Mailing List archive

    [PATCH v4] fs: avoid spurious dentry ref/unref cycle on open
  2. 02 Linux Kernel Mailing List archive

    [PATCH v5] discussion: fs: avoid spurious dentry ref/unref cycle on open
  3. 03 Phoronix

    Linux 7.4 file-open optimization coverage and VFS queue status