Whamcloud - gitweb
LU-15828 o2iblnd: reset hiw proportionally
authorSerguei Smirnov <ssmirnov@whamcloud.com>
Thu, 22 Dec 2022 22:42:48 +0000 (14:42 -0800)
committerAndreas Dilger <adilger@whamcloud.com>
Tue, 17 Jan 2023 19:38:44 +0000 (19:38 +0000)
commit5a5f484d4451d0bbdce2237c19e12dac97a35f71
tree05974d7add5bc9bde25a39765ea206e2886ddb07
parenta733121bbe2358ae749b26ab5d41751be812eab2
LU-15828 o2iblnd: reset hiw proportionally

As a result of connection negotiation, queue depth may end up
being shorter than "peer_tx_credits" tunables value. Before this
patch, the high-water mark "lnd_peercredits_hiw" would be set at
min(current hiw, queue depth - 1).

For example, considering that hiw is allowed to only be as low as
half of peer_tx_credits, negotiating queue_depth/peer_credits down
from 32 to 8 would always result in hiw set at 7, i.e. credits would
be released as late as possible.

With this patch, if queue depth is reduced, hiw is set proportionally
relative to the level it was at before:
hiw = (queue_depth * lnd_peercredits_hiw) / peer_tx_credits

Using the above example with queue depth initially at 32, negotiating
down to 8 would result in hiw set to 4 if "lnd_peercredits_hiw" is
initially at 16, 17, 18, 19; hiw set to 5 if "lnd_peercredits_hiw" is
initially at 20, 21, 22, 23, and so on.

Lustre-change: https://review.whamcloud.com/49497
Lustre-commit: e1944c29793d489429730a9445e243b448c3d751

Test-Parameters: trivial
Signed-off-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Change-Id: I633933d7448db1ca88d3c65de9c29e870ca2c9fb
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/49637
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lnet/klnds/o2iblnd/o2iblnd.h