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 v3 2/2] btrfs: use iget5_locked_rcu
Date: Tue, 11 Jun 2024 12:16:32 +0200 [thread overview]
Message-ID: <20240611101633.507101-3-mjguzik@gmail.com> (raw)
In-Reply-To: <20240611101633.507101-1-mjguzik@gmail.com>
With 20 threads each walking a dedicated 1000 dirs * 1000 files
directory tree to stat(2) on a 32 core + 24GB ram vm:
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%)
Benchmark can be found here: https://people.freebsd.org/~mjg/fstree.tgz
Signed-off-by: Mateusz Guzik <mjguzik@gmail.com>
---
fs/btrfs/inode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 4883cb512379..457d2c18d071 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -5588,7 +5588,7 @@ static struct inode *btrfs_iget_locked(struct super_block *s, u64 ino,
args.ino = ino;
args.root = root;
- inode = iget5_locked(s, hashval, btrfs_find_actor,
+ inode = iget5_locked_rcu(s, hashval, btrfs_find_actor,
btrfs_init_locked_inode,
(void *)&args);
return inode;
--
2.43.0
next prev parent reply other threads:[~2024-06-11 10:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-11 10:16 [PATCH v3 0/2] rcu-based inode lookup for iget* Mateusz Guzik
2024-06-11 10:16 ` [PATCH v3 1/2] vfs: add rcu-based find_inode variants for iget ops Mateusz Guzik
2024-06-11 10:50 ` Jan Kara
2024-06-11 11:40 ` Mateusz Guzik
2024-06-11 13:04 ` Christian Brauner
2024-06-11 13:13 ` Mateusz Guzik
2024-06-11 21:43 ` Dave Chinner
2024-06-11 10:16 ` Mateusz Guzik [this message]
2024-06-11 16:49 ` [PATCH v3 0/2] rcu-based inode lookup for iget* Josef Bacik
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=20240611101633.507101-3-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.