summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorMateusz Guzik <mjguzik@gmail.com>2024-06-11 19:38:23 +0200
committerChristian Brauner <brauner@kernel.org>2024-06-12 14:10:00 +0200
commit3a8e2f99f18d69389366e16375e9a0e41ed43779 (patch)
treebb3490719b0854f4d93e7b28156058825e140ec0 /fs
parentvfs: add rcu-based find_inode variants for iget ops (diff)
downloadlinux-3a8e2f99f18d69389366e16375e9a0e41ed43779.tar.xz
linux-3a8e2f99f18d69389366e16375e9a0e41ed43779.zip
btrfs: use iget5_locked_rcu
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 Reviewed-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Mateusz Guzik <mjguzik@gmail.com> Link: https://lore.kernel.org/r/20240611173824.535995-3-mjguzik@gmail.com Acked-by: David Sterba <dsterba@suse.com> Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/inode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 753db965f7c0..cbb2c92b6c08 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -5587,7 +5587,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;