[lustre-devel] [PATCH 02/21] lnet: report actual timeout used by lnd

James Simmons jsimmons at infradead.org
Fri Feb 7 16:30:08 PST 2025


From: Frank Sehr <fsehr at whamcloud.com>

lnd_timeout value reported by lnetctl may be different
from what is actually used.
There's an lnd_timeout calculated as a function of transaction
timeout and retry_count. This is the value displayed by
"lnetctl global show". However, each LND may define its own
timeout by setting timeout module parameter to a positive value,
which overrides the higher-level lnd_timeout defined by LNet.
lnetctl net show -v will show the timeout value in the
lnd_tunables section.
The timeout for socklnd and o2iblnd is implemented.

WC-bug-id: https://jira.whamcloud.com/browse/LU-16548
Lustre-commit: 56097c490465cb67a ("LU-16548 lnet: report actual timeout used by lnd")
Signed-off-by: Frank Sehr <fsehr at whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50620
Reviewed-by: Neil Brown <neilb at suse.de>
Reviewed-by: Serguei Smirnov <ssmirnov at whamcloud.com>
Reviewed-by: Cyril Bordage <cbordage at whamcloud.com>
Reviewed-by: Oleg Drokin <green at whamcloud.com>
Signed-off-by: James Simmons <jsimmons at infradead.org>
---
 include/uapi/linux/lnet/lnet-dlc.h         | 2 ++
 net/lnet/klnds/o2iblnd/o2iblnd_modparams.c | 2 ++
 net/lnet/klnds/socklnd/socklnd_modparams.c | 2 ++
 3 files changed, 6 insertions(+)

diff --git a/include/uapi/linux/lnet/lnet-dlc.h b/include/uapi/linux/lnet/lnet-dlc.h
index d7592f3fd1f8..b4851b193a90 100644
--- a/include/uapi/linux/lnet/lnet-dlc.h
+++ b/include/uapi/linux/lnet/lnet-dlc.h
@@ -105,12 +105,14 @@ struct lnet_ioctl_config_o2iblnd_tunables {
 	__u32 lnd_fmr_cache;
 	__u16 lnd_conns_per_peer;
 	__u16 lnd_ntx;
+	__u32 lnd_timeout;
 };
 
 struct lnet_ioctl_config_socklnd_tunables {
 	__u32 lnd_version;
 	__u16 lnd_conns_per_peer;
 	__u16 lnd_pad;
+	__u32 lnd_timeout;
 };
 
 struct lnet_lnd_tunables {
diff --git a/net/lnet/klnds/o2iblnd/o2iblnd_modparams.c b/net/lnet/klnds/o2iblnd/o2iblnd_modparams.c
index 04286e18c7ba..e26bedee00ba 100644
--- a/net/lnet/klnds/o2iblnd/o2iblnd_modparams.c
+++ b/net/lnet/klnds/o2iblnd/o2iblnd_modparams.c
@@ -316,6 +316,8 @@ int kiblnd_tunables_setup(struct lnet_ni *ni)
 			conns_per_peer : 1;
 	}
 
+	tunables->lnd_timeout = kiblnd_timeout();
+
 	return 0;
 }
 
diff --git a/net/lnet/klnds/socklnd/socklnd_modparams.c b/net/lnet/klnds/socklnd/socklnd_modparams.c
index 031fe13d2a38..ed6c60e88c84 100644
--- a/net/lnet/klnds/socklnd/socklnd_modparams.c
+++ b/net/lnet/klnds/socklnd/socklnd_modparams.c
@@ -332,4 +332,6 @@ void ksocknal_tunables_setup(struct lnet_ni *ni)
 	if (!tunables->lnd_conns_per_peer)
 		tunables->lnd_conns_per_peer =
 			ksocklnd_lookup_conns_per_peer(ni);
+
+	tunables->lnd_timeout = ksocknal_timeout();
 }
-- 
2.39.3



More information about the lustre-devel mailing list