@@ -555,12 +555,12 @@ static int mgc_requeue_thread(void *data)
* caused the lock revocation to finish its setup, plus some
* random so everyone doesn't try to reconnect at once.
*/
- to = msecs_to_jiffies(MGC_TIMEOUT_MIN_SECONDS * MSEC_PER_SEC);
- /* rand is centi-seconds */
- to += msecs_to_jiffies(rand * MSEC_PER_SEC / 100);
+ /* rand is centi-seconds, "to" is in centi-HZ */
+ to = MGC_TIMEOUT_MIN_SECONDS * HZ * 100;
+ to += rand * HZ;
wait_event_idle_timeout(rq_waitq,
rq_state & (RQ_STOP | RQ_PRECLEANUP),
- to);
+ to/100);
/*
* iterate & processing through the list. for each cld, process
@@ -226,7 +226,7 @@ static void obd_t10_performance_test(const char *obd_name,
memset(buf, 0xAD, PAGE_SIZE);
kunmap(page);
- for (start = jiffies, end = start + msecs_to_jiffies(MSEC_PER_SEC / 4),
+ for (start = jiffies, end = start + HZ / 4,
bcount = 0; time_before(jiffies, end) && rc == 0; bcount++) {
rc = __obd_t10_performance_test(obd_name, cksum_type, page,
buf_len / PAGE_SIZE);
@@ -901,9 +901,8 @@ static void osc_grant_work_handler(struct work_struct *data)
return;
if (next_shrink > ktime_get_seconds())
- schedule_delayed_work(&work, msecs_to_jiffies(
- (next_shrink - ktime_get_seconds()) *
- MSEC_PER_SEC));
+ schedule_delayed_work(&work,
+ (next_shrink - ktime_get_seconds()) * HZ);
else
schedule_work(&work.work);
}
@@ -3550,7 +3550,7 @@ static int kiblnd_resolve_addr(struct rdma_cm_id *cmid,
kiblnd_data.kib_peer_hash_size;
}
- deadline += msecs_to_jiffies(p * MSEC_PER_SEC);
+ deadline += p * HZ;
spin_lock_irqsave(lock, flags);
}
@@ -346,7 +346,7 @@ static void cfs_crypto_performance_test(enum cfs_crypto_hash_alg hash_alg)
memset(buf, 0xAD, PAGE_SIZE);
kunmap(page);
- for (start = jiffies, end = start + msecs_to_jiffies(MSEC_PER_SEC / 4),
+ for (start = jiffies, end = start + HZ / 4,
bcount = 0; time_before(jiffies, end) && err == 0; bcount++) {
struct ahash_request *hdesc;
int i;
@@ -47,7 +47,7 @@
lnet_sock_write(struct socket *sock, void *buffer, int nob, int timeout)
{
int rc;
- long jiffies_left = timeout * msecs_to_jiffies(MSEC_PER_SEC);
+ long jiffies_left = timeout * HZ;
unsigned long then;
struct timeval tv;
struct __kernel_sock_timeval ktv;
@@ -105,7 +105,7 @@
lnet_sock_read(struct socket *sock, void *buffer, int nob, int timeout)
{
int rc;
- long jiffies_left = timeout * msecs_to_jiffies(MSEC_PER_SEC);
+ long jiffies_left = timeout * HZ;
unsigned long then;
struct timeval tv;
struct __kernel_sock_timeval ktv;