Whamcloud - gitweb
LU-13569 lnet: Deprecate lnet_recovery_interval 22/39722/16
authorChris Horn <chris.horn@hpe.com>
Fri, 21 Aug 2020 19:42:48 +0000 (14:42 -0500)
committerOleg Drokin <green@whamcloud.com>
Wed, 28 Apr 2021 02:10:38 +0000 (02:10 +0000)
We no longer use a static recovery interval, so remove its remaining
uses and add warning that it has been deprecated.

Test-Parameters: trivial
HPE-bug-id: LUS-9109
Signed-off-by: Chris Horn <chris.horn@hpe.com>
Change-Id: Iedc79803ef5b7ba041a531961eb77acd338abfb5
Reviewed-on: https://review.whamcloud.com/39722
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/lnet/api-ni.c
lnet/lnet/lib-move.c

index 4085c73..9ea4719 100644 (file)
@@ -122,7 +122,7 @@ module_param_call(lnet_recovery_interval, recovery_interval_set, param_get_int,
                  &lnet_recovery_interval, S_IRUGO|S_IWUSR);
 #endif
 MODULE_PARM_DESC(lnet_recovery_interval,
                  &lnet_recovery_interval, S_IRUGO|S_IWUSR);
 #endif
 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);
 
 unsigned int lnet_recovery_limit;
 module_param(lnet_recovery_limit, uint, 0644);
@@ -311,30 +311,7 @@ sensitivity_set(const char *val, cfs_kernel_param_arg_t *kp)
 static int
 recovery_interval_set(const char *val, cfs_kernel_param_arg_t *kp)
 {
 static int
 recovery_interval_set(const char *val, cfs_kernel_param_arg_t *kp)
 {
-       int rc;
-       unsigned *interval = (unsigned *)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;
 }
 
        return 0;
 }
index c9b14f5..9420d6a 100644 (file)
@@ -3735,9 +3735,7 @@ lnet_recover_peer_nis(void)
 static int
 lnet_monitor_thread(void *arg)
 {
 static int
 lnet_monitor_thread(void *arg)
 {
-       time64_t recovery_timeout = 0;
        time64_t rsp_timeout = 0;
        time64_t rsp_timeout = 0;
-       int interval;
        time64_t now;
 
        wait_for_completion(&the_lnet.ln_started);
        time64_t now;
 
        wait_for_completion(&the_lnet.ln_started);
@@ -3764,11 +3762,8 @@ lnet_monitor_thread(void *arg)
                        rsp_timeout = now + (lnet_transaction_timeout / 2);
                }
 
                        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
 
                /*
                 * TODO do we need to check if we should sleep without
@@ -3778,18 +3773,10 @@ lnet_monitor_thread(void *arg)
                 * 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.
                 * 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,
                wait_for_completion_interruptible_timeout(
                        &the_lnet.ln_mt_wait_complete,
-                       cfs_time_seconds(interval));
+                       cfs_time_seconds(1));
                /* Must re-init the completion before testing anything,
                 * including ln_mt_state.
                 */
                /* Must re-init the completion before testing anything,
                 * including ln_mt_state.
                 */