Skip to content

Commit

Permalink
vfs: drop conditional inode prefetch in __do_lookup_rcu
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Linus Torvalds committed Jul 21, 2011
1 parent b307d46 commit b91da88
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions fs/dcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -1813,8 +1813,6 @@ struct dentry *__d_lookup_rcu(struct dentry *parent, struct qstr *name,
tname = dentry->d_name.name;
i = dentry->d_inode;
prefetch(tname);
if (i)
prefetch(i);
/*
* This seqcount check is required to ensure name and
* len are loaded atomically, so as not to walk off the
Expand Down

0 comments on commit b91da88

Please sign in to comment.