Skip to content

Commit b91da88

Browse files
committed
vfs: drop conditional inode prefetch in __do_lookup_rcu
It seems to hurt performance in real life. Yes, the inode will be used later, but the conditional doesn't seem to predict all that well (negative dentries are not uncommon) and it looks like the cost of prefetching is simply higher than depending on the cache doing the right thing. As usual. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent b307d46 commit b91da88

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

fs/dcache.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1813,8 +1813,6 @@ struct dentry *__d_lookup_rcu(struct dentry *parent, struct qstr *name,
18131813
tname = dentry->d_name.name;
18141814
i = dentry->d_inode;
18151815
prefetch(tname);
1816-
if (i)
1817-
prefetch(i);
18181816
/*
18191817
* This seqcount check is required to ensure name and
18201818
* len are loaded atomically, so as not to walk off the

0 commit comments

Comments
 (0)