Whamcloud - gitweb
LU-18566 lnet: dynamically configure timeouts 14/57514/6
authorCaleb Carlson <caleb.carlson@hpe.com>
Tue, 18 Jun 2024 19:04:42 +0000 (13:04 -0600)
committerOleg Drokin <green@whamcloud.com>
Thu, 6 Mar 2025 08:06:03 +0000 (08:06 +0000)
commitc3d1ca4478485715ee6e800f4ca2df224226a332
tree6cc21cba618513434e87e3f1e44c889e6cce182f
parent10f86dc25dd5e428a92348ed082bbbcf6b0cc90f
LU-18566 lnet: dynamically configure timeouts

Add/use default LND timeouts:
* SOCKNAL_TIMEOUT_DEFAULT = 50,
* IBLND_TIMEOUT_DEFAULT   = 50,
* KFILND_TIMEOUT_DEFAULT  = 125,
* GNILND_TIMEOUT_BASE    = 60

LND timeouts default to these if not set by kernel
module params. Return only this value from the
<lnd>_timeout() functions, dropping the call to
lnet_get_lnd_timeout() which was based on the LTT and
LRC values.

Adds lnd_get_timeout() function to the lnet_lnd API
procedural struct, which returns the LND timeout of
whichever LND initialized the struct.

Use this lnd_get_timeout() function to update
the lnet_lnd tunables upon retrieval, to get current
value from module parameters.

For kfilnd, switch to using kfilnd_timeout() instead of
lnet_get_lnd_timeout(). Define KP_PURGE_LIMIT for KFI
peer purge timeout limits.

For lolnd, there's no timeout function definition, so
added conditional logic to check if the timeout function
is valid and returns a positive integer. Also, LNetGet
using the loopback LND creates the message with both
msg_txni and msg_rxni being NULL, so we check for that
condition.

Use control flow for send/recv to find correct msg NI.
Fix formatting of struct array in nidstrings.c.

Add module param path variables for ksocklnd,
kkfilnd, and kgnilnd. Renames the o2ib_modparam
variable to be more consistent:
o2iblnd_modparam_path.

Remove depency on default lnet_lnd_timeout value
in kgnilnd_timeout() function; use tunable value
instead.

Fallback to lnet_get_lnd_timeout() if tunables timeout
value is 0 (or is unset).

Modifies the 'lnetctl net set' command to allow setting
the LND timeout value via:
'lnetctl net set --net <foo> --lnd-timeout <val>'

Renames yaml_lnet_config_ni_healthv to
yaml_lnet_config_ni_value and adds arguments to broaden
the scope of the function.

Fixes bug when setting both --all and --nid for lnetctl net
set not returning -EINVAL.

Adds sanity tests to sanity-lnet.sh that tests
dynamically configured LND timeouts using values
from LND tunables set and display, and tests
that setting the LND tunable timeout value to zero
ends up defaulting to global lnd_timeout value.

Add timeout get functionality for netlink to kfilnd.

Signed-off-by: Caleb Carlson <caleb.carlson@hpe.com>
HPE-bug-id: LUS-12342
Test-Parameters: testlist="sanity-lnet"
Change-Id: Ic69a7d9d6af4cfed65d07caaf87d8b78238beab0
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57514
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
24 files changed:
lnet/include/lnet/lib-types.h
lnet/include/uapi/linux/lnet/lnet-dlc.h
lnet/klnds/gnilnd/gnilnd.c
lnet/klnds/gnilnd/gnilnd.h
lnet/klnds/kfilnd/kfilnd.c
lnet/klnds/kfilnd/kfilnd.h
lnet/klnds/kfilnd/kfilnd_modparams.c
lnet/klnds/kfilnd/kfilnd_peer.c
lnet/klnds/kfilnd/kfilnd_peer.h
lnet/klnds/kfilnd/kfilnd_tn.c
lnet/klnds/o2iblnd/o2iblnd.c
lnet/klnds/o2iblnd/o2iblnd.h
lnet/klnds/o2iblnd/o2iblnd_modparams.c
lnet/klnds/socklnd/socklnd.c
lnet/klnds/socklnd/socklnd.h
lnet/klnds/socklnd/socklnd_modparams.c
lnet/lnet/api-ni.c
lnet/lnet/lib-msg.c
lnet/lnet/nidstrings.c
lnet/utils/lnetconfig/liblnetconfig.c
lnet/utils/lnetconfig/liblnetconfig.h
lnet/utils/lnetconfig/liblnetconfig_lnd.c
lnet/utils/lnetctl.c
lustre/tests/sanity-lnet.sh