]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
Merge patch series "revamp fs/filesystems.c"
authorChristian Brauner <brauner@kernel.org>
Mon, 27 Apr 2026 14:49:01 +0000 (16:49 +0200)
committerChristian Brauner <brauner@kernel.org>
Mon, 11 May 2026 21:13:01 +0000 (23:13 +0200)
Mateusz Guzik <mjguzik@gmail.com> says:

The file is a mess with a hand-rolled linked list in a desperate need of
a clean up.

The code to emit /proc/filesystems is used frequently because libselinux
reads the file, which in turn is linked into numerous frequently used
programs (even ones you would not suspect, like sed!). In order to
combat that pre-gen the string instead of pointer-chasing and printfing
one by-one.

open+read+close cycle single-threaded (ops/s):
before: 442732
after:  1063462 (+140%)

Additionally scalability is also improved thanks to bypassing ref
maintenance on open/close.

open+read+close cycle with 20 processes (ops/s):
before: 606177
after: 3300576 (+444%)

The main bottleneck afterwards is the spurious lockref trip on open.

* patches from https://patch.msgid.link/20260425220844.1763933-1-mjguzik@gmail.com:
  fs: cache the string generated by reading /proc/filesystems
  fs: RCU-ify filesystems list
  proc: allow to mark /proc files permanent outside of fs/proc/

Link: https://patch.msgid.link/20260425220844.1763933-1-mjguzik@gmail.com
Signed-off-by: Christian Brauner <brauner@kernel.org>

Trivial merge