From: Mateusz Guzik <mjguzik@gmail.com>
To: brauner@kernel.org
Cc: viro@zeniv.linux.org.uk, jack@suse.cz,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
adobriyan@gmail.com, Mateusz Guzik <mjguzik@gmail.com>
Subject: [PATCH v3 0/3] revamp fs/filesystems.c
Date: Sun, 26 Apr 2026 00:08:41 +0200 [thread overview]
Message-ID: <20260425220844.1763933-1-mjguzik@gmail.com> (raw)
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.
Alexey Dobriyan (1):
proc: allow to mark /proc files permanent outside of fs/proc/
Christian Brauner (1):
fs: RCU-ify filesystems list
Mateusz Guzik (1):
fs: cache the string generated by reading /proc/filesystems
fs/filesystems.c | 332 +++++++++++++++++++++++++++-------------
fs/ocfs2/super.c | 1 -
fs/proc/generic.c | 12 ++
fs/proc/internal.h | 3 +
include/linux/fs.h | 2 +-
include/linux/proc_fs.h | 10 ++
6 files changed, 252 insertions(+), 108 deletions(-)
--
2.48.1
next reply other threads:[~2026-04-25 22:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-25 22:08 Mateusz Guzik [this message]
2026-04-25 22:08 ` [PATCH v3 1/3] proc: allow to mark /proc files permanent outside of fs/proc/ Mateusz Guzik
2026-04-25 22:08 ` [PATCH v3 2/3] fs: RCU-ify filesystems list Mateusz Guzik
2026-04-25 22:08 ` [PATCH v3 3/3] fs: cache the string generated by reading /proc/filesystems Mateusz Guzik
2026-04-27 14:53 ` [PATCH v3 0/3] revamp fs/filesystems.c Christian Brauner
2026-04-28 6:36 ` Why does GNU sed abuse /proc/filesystems? " Cedric Blancher
2026-04-28 8:31 ` Mateusz Guzik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260425220844.1763933-1-mjguzik@gmail.com \
--to=mjguzik@gmail.com \
--cc=adobriyan@gmail.com \
--cc=brauner@kernel.org \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox