diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-09-15 02:28:32 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-09-15 02:28:32 +0200 |
commit | 9226b5b440f2b4fbb3b797f3cb74a9a627220660 (patch) | |
tree | 2b9ff475c498e19606031d5e7fde74cdba30dee8 /fs/dcache.c | |
parent | Merge branch 'parisc-3.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git... (diff) | |
download | linux-9226b5b440f2b4fbb3b797f3cb74a9a627220660.tar.xz linux-9226b5b440f2b4fbb3b797f3cb74a9a627220660.zip |
vfs: avoid non-forwarding large load after small store in path lookup
The performance regression that Josef Bacik reported in the pathname
lookup (see commit 99d263d4c5b2 "vfs: fix bad hashing of dentries") made
me look at performance stability of the dcache code, just to verify that
the problem was actually fixed. That turned up a few other problems in
this area.
There are a few cases where we exit RCU lookup mode and go to the slow
serializing case when we shouldn't, Al has fixed those and they'll come
in with the next VFS pull.
But my performance verification also shows that link_path_walk() turns
out to have a very unfortunate 32-bit store of the length and hash of
the name we look up, followed by a 64-bit read of the combined hash_len
field. That screws up the processor store to load forwarding, causing
an unnecessary hickup in this critical routine.
It's caused by the ugly calling convention for the "hash_name()"
function, and easily fixed by just making hash_name() fill in the whole
'struct qstr' rather than passing it a pointer to just the hash value.
With that, the profile for this function looks much smoother.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/dcache.c')
0 files changed, 0 insertions, 0 deletions