Whamcloud - gitweb
LU-16797 lnet: improve numeric NID to CPT hashing 62/50862/2
authorChris Horn <chris.horn@hpe.com>
Mon, 1 May 2023 19:25:47 +0000 (13:25 -0600)
committerOleg Drokin <green@whamcloud.com>
Fri, 19 May 2023 07:10:00 +0000 (07:10 +0000)
commitbd12731f2f15b390345a3b58947325885346b072
tree529346858f8207e2e8a803361daba85d1d1161a7
parentf827e1e04e36f3f8533c321c1248c7b0a62da287
LU-16797 lnet: improve numeric NID to CPT hashing

Testing shows that the sum-by-multiplication of nid bytes method for
hashing a NID to a CPT does not have good distribution for gnilnd
and kfilnd NIDs. For these LNDs, use the old hash_long() method.

Also modify lustre_lnet_calc_cpt_of_nid() to ensure the specified
number of CPTs is greater than 0. This avoids a divide by zero.

Test-Parameters: trivial
HPE-bug-id: LUS-11576
Signed-off-by: Chris Horn <chris.horn@hpe.com>
Change-Id: I77c6a5c3bc6b773e97f0a3c87182c31674d284e0
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50862
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/lnet/api-ni.c
lnet/utils/lnetconfig/liblnetconfig.c