Whamcloud - gitweb
LU-6174 nrs: perform proper division 49/36749/6
authorJames Simmons <jsimmons@infradead.org>
Thu, 5 Mar 2020 16:34:14 +0000 (11:34 -0500)
committerOleg Drokin <green@whamcloud.com>
Tue, 17 Mar 2020 03:40:05 +0000 (03:40 +0000)
commitc80319213c6dc4ac9826a1bd10c75373e08db837
treecbaca50ee267cdc6aa6a6f82a6f002879852dd95
parent6612e57a233fa22af00173366e1121b68bb5524e
LU-6174 nrs: perform proper division

For NRS TBF both tr_nsecs and tr_rpc_rate are 64 bit values. The
code is wrongly using do_div() which could truncate tr_rpc_rate
to a 32 bit value. With current hardware setups the rpc rate is
less than the 4 billion limit of u32, currently I see 64K of rpcs
with a single IB port. Since this is the case we can change
tr_rpc_rate to a 32 bit value.

Change-Id: I62eabf3a8a30f5c9062aaf4c32fa878710a788c8
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/36749
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Li Xi <lixi@ddn.com>
lustre/include/lustre_nrs_tbf.h
lustre/ptlrpc/nrs_tbf.c