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,
linux-btrfs@vger.kernel.org, josef@toxicpanda.com,
hch@infradead.org, Mateusz Guzik <mjguzik@gmail.com>
Subject: [PATCH v4 0/2] rcu-based inode lookup for iget*
Date: Tue, 11 Jun 2024 19:38:21 +0200 [thread overview]
Message-ID: <20240611173824.535995-1-mjguzik@gmail.com> (raw)
I revamped the commit message for patch 1, explicitly spelling out a
bunch of things and adding bpftrace output. Please read it.
There was some massaging of lines in the include/linux/fs.h header
files. If you don't like it I would appreciate if you adjusted it
however you see fit on your own.
This adjusts the state to what was suggested by Christian.
Specific results:
ext4 (needed mkfs.ext4 -N 24000000):
before: 3.77s user 890.90s system 1939% cpu 46.118 total
after: 3.24s user 397.73s system 1858% cpu 21.581 total (-53%)
btrfs (s/iget5_locked/iget5_locked_rcu in fs/btrfs/inode.c):
before: 3.54s user 892.30s system 1966% cpu 45.549 total
after: 3.28s user 738.66s system 1955% cpu 37.932 total (-16.7%)
btrfs bottlenecks itself on its own locks here.
Benchmark info in the commit message to the first patch.
fs rundown is as follows:
- ext4 patched implicitly
- xfs does not use the inode hash
- bcachefs is out of the picture as Kent decided to implement his own
inode hashing based on rhashtable, for now private to his fs.
- btrfs handled in the patchset
I have not looked at others.
v4:
- only provide iget5_locked_rcu
- add a btrfs ack
v3:
- export new routines with _GPL
- don't use the extern keyword
- add ilookup5_rcu to follow iget5_locked scheme
v2:
- add argument lists to new routines
- assert the inode hash lock is not held as applicable
- real btrfs patch included
Mateusz Guzik (2):
vfs: add rcu-based find_inode variants for iget ops
btrfs: use iget5_locked_rcu
fs/btrfs/inode.c | 2 +-
fs/inode.c | 119 ++++++++++++++++++++++++++++++++++++++-------
include/linux/fs.h | 10 +++-
3 files changed, 112 insertions(+), 19 deletions(-)
--
2.43.0
next reply other threads:[~2024-06-11 17:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-11 17:38 Mateusz Guzik [this message]
2024-06-11 17:38 ` [PATCH v4 1/2] vfs: add rcu-based find_inode variants for iget ops Mateusz Guzik
2024-06-13 14:40 ` Jan Kara
2024-06-11 17:38 ` [PATCH v4 2/2] btrfs: use iget5_locked_rcu Mateusz Guzik
2024-06-12 18:33 ` David Sterba
2024-06-12 12:08 ` [PATCH v4 0/2] rcu-based inode lookup for iget* Christian Brauner
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=20240611173824.535995-1-mjguzik@gmail.com \
--to=mjguzik@gmail.com \
--cc=brauner@kernel.org \
--cc=hch@infradead.org \
--cc=jack@suse.cz \
--cc=josef@toxicpanda.com \
--cc=linux-btrfs@vger.kernel.org \
--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