summaryrefslogtreecommitdiff
path: root/fs/dcache.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-09-13 22:24:03 +0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-09-13 22:24:03 +0400
commit23d0db76ffa13ffb95229946e4648568c3c29db5 (patch)
treea468c5bb0428be35da5200af5c3aa44dde163b81 /fs/dcache.c
parent72d931046030beb2d13dad6d205be0e228618432 (diff)
downloadlinux-23d0db76ffa13ffb95229946e4648568c3c29db5.tar.xz
Make hash_64() use a 64-bit multiply when appropriate
The hash_64() function historically does the multiply by the GOLDEN_RATIO_PRIME_64 number with explicit shifts and adds, because unlike the 32-bit case, gcc seems unable to turn the constant multiply into the more appropriate shift and adds when required. However, that means that we generate those shifts and adds even when the architecture has a fast multiplier, and could just do it better in hardware. Use the now-cleaned-up CONFIG_ARCH_HAS_FAST_MULTIPLIER (together with "is it a 64-bit architecture") to decide whether to use an integer multiply or the explicit sequence of shift/add instructions. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/dcache.c')
0 files changed, 0 insertions, 0 deletions