Skip to content

Commit 3a8e2f9

Browse files
mjguzikbrauner
authored andcommitted
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 <[email protected]> Signed-off-by: Mateusz Guzik <[email protected]> Link: https://lore.kernel.org/r/[email protected] Acked-by: David Sterba <[email protected]> Signed-off-by: Christian Brauner <[email protected]>
1 parent 7180f8d commit 3a8e2f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/btrfs/inode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5587,7 +5587,7 @@ static struct inode *btrfs_iget_locked(struct super_block *s, u64 ino,
55875587
args.ino = ino;
55885588
args.root = root;
55895589

5590-
inode = iget5_locked(s, hashval, btrfs_find_actor,
5590+
inode = iget5_locked_rcu(s, hashval, btrfs_find_actor,
55915591
btrfs_init_locked_inode,
55925592
(void *)&args);
55935593
return inode;

0 commit comments

Comments
 (0)