diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2021-10-01 02:10:03 +0300 |
---|---|---|
committer | Chuck Lever <chuck.lever@oracle.com> | 2021-12-13 21:42:59 +0300 |
commit | 7578b2f628db27281d3165af0aa862311883a858 (patch) | |
tree | 5c034380b0eb3c31f47eeb37a669ec52ac00c44d /net/mctp | |
parent | 23a1a573c61ccb5e7829c1f5472d3e025293a031 (diff) | |
download | linux-7578b2f628db27281d3165af0aa862311883a858.tar.xz |
NFSD: Remove be32_to_cpu() from DRC hash function
Commit 7142b98d9fd7 ("nfsd: Clean up drc cache in preparation for
global spinlock elimination"), billed as a clean-up, added
be32_to_cpu() to the DRC hash function without explanation. That
commit removed two comments that state that byte-swapping in the
hash function is unnecessary without explaining whether there was
a need for that change.
On some Intel CPUs, the swab32 instruction is known to cause a CPU
pipeline stall. be32_to_cpu() does not add extra randomness, since
the hash multiplication is done /before/ shifting to the high-order
bits of the result.
As a micro-optimization, remove the unnecessary transform from the
DRC hash function.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'net/mctp')
0 files changed, 0 insertions, 0 deletions