Whamcloud - gitweb
LU-17680 ldlm: fix ldlm_res_hop_hash() argument 85/54585/5
authorAndreas Dilger <adilger@whamcloud.com>
Wed, 27 Mar 2024 23:08:04 +0000 (17:08 -0600)
committerOleg Drokin <green@whamcloud.com>
Mon, 8 Apr 2024 15:36:41 +0000 (15:36 +0000)
commit7bdbe5d8e30199eb198d8136d53ffa36c5c482c8
treec73b71059a8cf9f31bba843b0027e356752308d7
parenta9704ed2d81d0d4912b95dca5bfdedf3537706ee
LU-17680 ldlm: fix ldlm_res_hop_hash() argument

Change ldlm_res_hop_hash() to use "bits" instead of "mask" as the
last argument.  Otherwise, this is hashing all of the LDLM resources
down to very few buckets (e.g. "hash & 8" or "hash & 11") instead of
the full bit range (e.g. "hash & ((1 << 8) - 1)".

This is causing significant slowdowns for file creation performance,
in particular sanity test_123ac was running 2x slower when creating
a large number of files because of the bad hashing.

Fixes: ce404bd07c ("LU-17174 misc: fix hash functions")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I823b370bdb7fac4e673d1b479204dd1216931fb6
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54585
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Alexey Lyashkov <alexey.lyashkov@hpe.com>
lustre/ldlm/ldlm_resource.c