summaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.com>2018-05-21 14:35:12 +1000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-05-25 18:29:10 +0200
commit0f382119819eb5acdbc8be4b07be75882c3f97d7 (patch)
treee6009077a47934de96228d97577e76054225c706 /drivers/staging/lustre
parent8cb651475792797039610fe974a7d94d6784c877 (diff)
downloadop-kernel-dev-0f382119819eb5acdbc8be4b07be75882c3f97d7.zip
op-kernel-dev-0f382119819eb5acdbc8be4b07be75882c3f97d7.tar.gz
staging: lustre: discard CFS_TICK
This undocumented macro seems to represent "a small amount of time". Sometimes it is used as-is, some times it is multiplied by 5 for no obvious reason. It does not appear that there is any connection between the different places it is used - they all just want a short period for different purposes and of different durarions. So discard CFS_TICK and lets each use-site just use whatever number of jiffies seems appropriate in that case. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre')
-rw-r--r--drivers/staging/lustre/include/linux/libcfs/libcfs.h5
-rw-r--r--drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h2
-rw-r--r--drivers/staging/lustre/lustre/osc/osc_request.c2
-rw-r--r--drivers/staging/lustre/lustre/ptlrpc/import.c2
-rw-r--r--drivers/staging/lustre/lustre/ptlrpc/pinger.c2
5 files changed, 4 insertions, 9 deletions
diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs.h b/drivers/staging/lustre/include/linux/libcfs/libcfs.h
index 084150e..57d66af 100644
--- a/drivers/staging/lustre/include/linux/libcfs/libcfs.h
+++ b/drivers/staging/lustre/include/linux/libcfs/libcfs.h
@@ -90,11 +90,6 @@
#define LIBCFS_VERSION "0.7.0"
/*
- * One jiffy
- */
-#define CFS_TICK (1UL)
-
-/*
* Lustre Error Checksum: calculates checksum
* of Hex number by XORing each bit.
*/
diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h
index 570f54e..a078416 100644
--- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h
+++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h
@@ -58,7 +58,7 @@
#define SOCKNAL_PEER_HASH_SIZE 101 /* # peer lists */
#define SOCKNAL_RESCHED 100 /* # scheduler loops before reschedule */
#define SOCKNAL_INSANITY_RECONN 5000 /* connd is trying on reconn infinitely */
-#define SOCKNAL_ENOMEM_RETRY CFS_TICK /* jiffies between retries */
+#define SOCKNAL_ENOMEM_RETRY 1 /* jiffies between retries */
#define SOCKNAL_SINGLE_FRAG_TX 0 /* disable multi-fragment sends */
#define SOCKNAL_SINGLE_FRAG_RX 0 /* disable multi-fragment receives */
diff --git a/drivers/staging/lustre/lustre/osc/osc_request.c b/drivers/staging/lustre/lustre/osc/osc_request.c
index 0155294..0f355c4 100644
--- a/drivers/staging/lustre/lustre/osc/osc_request.c
+++ b/drivers/staging/lustre/lustre/osc/osc_request.c
@@ -748,7 +748,7 @@ static int osc_should_shrink_grant(struct client_obd *client)
OBD_CONNECT_GRANT_SHRINK) == 0)
return 0;
- if (time_after_eq(time, next_shrink - 5 * CFS_TICK)) {
+ if (time_after_eq(time, next_shrink - 5)) {
/* Get the current RPC size directly, instead of going via:
* cli_brw_size(obd->u.cli.cl_import->imp_obd->obd_self_export)
* Keep comment here so that it can be found by searching.
diff --git a/drivers/staging/lustre/lustre/ptlrpc/import.c b/drivers/staging/lustre/lustre/ptlrpc/import.c
index 537a9e2..f704f87 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/import.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/import.c
@@ -1501,7 +1501,7 @@ int ptlrpc_disconnect_import(struct obd_import *imp, int noclose)
if (wait_event_idle_timeout(imp->imp_recovery_waitq,
!ptlrpc_import_in_recovery(imp),
- max(timeout, CFS_TICK)) == 0)
+ max(timeout, 1UL)) == 0)
l_wait_event_abortable(
imp->imp_recovery_waitq,
!ptlrpc_import_in_recovery(imp));
diff --git a/drivers/staging/lustre/lustre/ptlrpc/pinger.c b/drivers/staging/lustre/lustre/ptlrpc/pinger.c
index 89eef8e..b3297b5 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/pinger.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/pinger.c
@@ -180,7 +180,7 @@ static void ptlrpc_pinger_process_import(struct obd_import *imp,
imp->imp_force_verify = 0;
- if (time_after_eq(imp->imp_next_ping - 5 * CFS_TICK, this_ping) &&
+ if (time_after_eq(imp->imp_next_ping - 5, this_ping) &&
!force) {
spin_unlock(&imp->imp_lock);
return;
OpenPOWER on IntegriCloud