From: James Simmons <jsimmons@infradead.org>
To: Andreas Dilger <adilger@whamcloud.com>,
Oleg Drokin <green@whamcloud.com>, NeilBrown <neilb@suse.de>
Cc: Chris Horn <chris.horn@hpe.com>,
Lustre Development List <lustre-devel@lists.lustre.org>
Subject: [lustre-devel] [PATCH 04/14] lnet: Deprecate lnet_recovery_interval
Date: Mon, 3 May 2021 20:10:06 -0400 [thread overview]
Message-ID: <1620087016-17857-5-git-send-email-jsimmons@infradead.org> (raw)
In-Reply-To: <1620087016-17857-1-git-send-email-jsimmons@infradead.org>
From: Chris Horn <chris.horn@hpe.com>
We no longer use a static recovery interval, so remove its remaining
uses and add warning that it has been deprecated.
HPE-bug-id: LUS-9109
C-bug-id: https://jira.whamcloud.com/browse/LU-13569
Lustre-commit: 79ab0535622782c82 ("LU-13569 lnet: Deprecate lnet_recovery_interval")
Signed-off-by: Chris Horn <chris.horn@hpe.com>
Reviewed-on: https://review.whamcloud.com/39722
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
net/lnet/lnet/api-ni.c | 26 ++------------------------
net/lnet/lnet/lib-move.c | 19 +++----------------
2 files changed, 5 insertions(+), 40 deletions(-)
diff --git a/net/lnet/lnet/api-ni.c b/net/lnet/lnet/api-ni.c
index cc40040..d6a8c1b 100644
--- a/net/lnet/lnet/api-ni.c
+++ b/net/lnet/lnet/api-ni.c
@@ -110,7 +110,7 @@ static int recovery_interval_set(const char *val,
__param_check(name, p, int)
module_param(lnet_recovery_interval, recovery_interval, 0644);
MODULE_PARM_DESC(lnet_recovery_interval,
- "Interval to recover unhealthy interfaces in seconds");
+ "DEPRECATED Interval to recover unhealthy interfaces in seconds");
unsigned int lnet_recovery_limit;
module_param(lnet_recovery_limit, uint, 0644);
@@ -253,29 +253,7 @@ static int lnet_discover(struct lnet_process_id id, u32 force,
static int
recovery_interval_set(const char *val, const struct kernel_param *kp)
{
- int rc;
- unsigned int *interval = (unsigned int *)kp->arg;
- unsigned long value;
-
- rc = kstrtoul(val, 0, &value);
- if (rc) {
- CERROR("Invalid module parameter value for 'lnet_recovery_interval'\n");
- return rc;
- }
-
- if (value < 1) {
- CERROR("lnet_recovery_interval must be at least 1 second\n");
- return -EINVAL;
- }
-
- /* The purpose of locking the api_mutex here is to ensure that
- * the correct value ends up stored properly.
- */
- mutex_lock(&the_lnet.ln_api_mutex);
-
- *interval = value;
-
- mutex_unlock(&the_lnet.ln_api_mutex);
+ CWARN("'lnet_recovery_interval' has been deprecated\n");
return 0;
}
diff --git a/net/lnet/lnet/lib-move.c b/net/lnet/lnet/lib-move.c
index 46c88d0..cb0943e 100644
--- a/net/lnet/lnet/lib-move.c
+++ b/net/lnet/lnet/lib-move.c
@@ -3480,9 +3480,7 @@ struct lnet_mt_event_info {
static int
lnet_monitor_thread(void *arg)
{
- time64_t recovery_timeout = 0;
time64_t rsp_timeout = 0;
- int interval;
time64_t now;
wait_for_completion(&the_lnet.ln_started);
@@ -3509,11 +3507,8 @@ struct lnet_mt_event_info {
rsp_timeout = now + (lnet_transaction_timeout / 2);
}
- if (now >= recovery_timeout) {
- lnet_recover_local_nis();
- lnet_recover_peer_nis();
- recovery_timeout = now + lnet_recovery_interval;
- }
+ lnet_recover_local_nis();
+ lnet_recover_peer_nis();
/* TODO do we need to check if we should sleep without
* timeout? Technically, an active system will always
@@ -3522,17 +3517,9 @@ struct lnet_mt_event_info {
* if we wake up every 1 second? Although, we've seen
* cases where we get a complaint that an idle thread
* is waking up unnecessarily.
- *
- * Take into account the current net_count when you wake
- * up for alive router checking, since we need to check
- * possibly as many networks as we have configured.
*/
- interval = min(lnet_recovery_interval,
- min((unsigned int)alive_router_check_interval /
- lnet_current_net_count,
- lnet_transaction_timeout / 2));
wait_for_completion_interruptible_timeout(&the_lnet.ln_mt_wait_complete,
- interval * HZ);
+ HZ);
/* Must re-init the completion before testing anything,
* including ln_mt_state.
*/
--
1.8.3.1
_______________________________________________
lustre-devel mailing list
lustre-devel@lists.lustre.org
http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org
next prev parent reply other threads:[~2021-05-04 0:10 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-04 0:10 [lustre-devel] [PATCH 00/14] Update to OpenSFS tree as of May 3, 2021 James Simmons
2021-05-04 0:10 ` [lustre-devel] [PATCH 01/14] lustre: llite: Remove last lockahead old compat James Simmons
2021-05-04 0:10 ` [lustre-devel] [PATCH 02/14] lustre: mdc: include linux/idr.h for referenced code James Simmons
2021-05-04 0:10 ` [lustre-devel] [PATCH 03/14] lnet: Recover local NI w/exponential backoff interval James Simmons
2021-05-04 0:10 ` James Simmons [this message]
2021-05-04 0:10 ` [lustre-devel] [PATCH 05/14] lnet: Router ping timeout with discovery disabled James Simmons
2021-05-04 0:10 ` [lustre-devel] [PATCH 06/14] lnet: Ensure proper peer, peer NI, peer net hierarchy James Simmons
2021-05-04 0:10 ` [lustre-devel] [PATCH 07/14] lnet: libcfs: simplify task management in tracefile.c James Simmons
2021-05-04 0:10 ` [lustre-devel] [PATCH 08/14] lustre: move lu_tgt_pool out of obd_target.h James Simmons
2021-05-04 0:10 ` [lustre-devel] [PATCH 09/14] lnet: libcfs: remove references to Sun Trademark James Simmons
2021-05-04 0:10 ` [lustre-devel] [PATCH 10/14] lnet: Skip discovery in LNetPrimaryNID if DD disabled James Simmons
2021-05-04 0:10 ` [lustre-devel] [PATCH 11/14] lustre: ptlrpc: idle import vs lock enqueue race James Simmons
2021-05-04 0:10 ` [lustre-devel] [PATCH 12/14] lustre: mdc: make rpc set for MDS_STATFS interruptible James Simmons
2021-05-04 0:10 ` [lustre-devel] [PATCH 13/14] lustre: llite: fake symlink type of foreign file/dir James Simmons
2021-05-04 0:10 ` [lustre-devel] [PATCH 14/14] lustre: llite: use d_is_symlink to test if dentry is a symlink James Simmons
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1620087016-17857-5-git-send-email-jsimmons@infradead.org \
--to=jsimmons@infradead.org \
--cc=adilger@whamcloud.com \
--cc=chris.horn@hpe.com \
--cc=green@whamcloud.com \
--cc=lustre-devel@lists.lustre.org \
--cc=neilb@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).