* [PATCH] SUNRPC: use jiffies_to_msecs for converting jiffies
@ 2015-03-03 9:24 Nicholas Mc Guire
[not found] ` <1425374665-446-1-git-send-email-hofrat-Q945KHDl0DbYtjvyW6yDsg@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Nicholas Mc Guire @ 2015-03-03 9:24 UTC (permalink / raw)
To: J. Bruce Fields
Cc: Trond Myklebust, Anna Schumaker, David S. Miller, linux-nfs,
netdev, linux-kernel, Nicholas Mc Guire
Use jiffies_to_msecs for converting jiffies as it handles all of the corner
cases reliably and also helps readability.
Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
---
This was only compile tested for x86_64_defconfig (implies CONFIG_SUNRPC=y)
Patch is against 4.0-rc1 (localversion-next is -next-20150303)
net/sunrpc/sched.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c
index b91fd9c..c234e7f 100644
--- a/net/sunrpc/sched.c
+++ b/net/sunrpc/sched.c
@@ -90,7 +90,7 @@ __rpc_add_timer(struct rpc_wait_queue *queue, struct rpc_task *task)
return;
dprintk("RPC: %5u setting alarm for %lu ms\n",
- task->tk_pid, task->tk_timeout * 1000 / HZ);
+ task->tk_pid, jiffies_to_msecs(task->tk_timeout));
task->u.tk_wait.expires = jiffies + task->tk_timeout;
if (list_empty(&queue->timer_list.list) || time_before(task->u.tk_wait.expires, queue->timer_list.expires))
--
1.7.10.4
^ permalink raw reply related [flat|nested] 3+ messages in thread[parent not found: <1425374665-446-1-git-send-email-hofrat-Q945KHDl0DbYtjvyW6yDsg@public.gmane.org>]
* Re: [PATCH] SUNRPC: use jiffies_to_msecs for converting jiffies [not found] ` <1425374665-446-1-git-send-email-hofrat-Q945KHDl0DbYtjvyW6yDsg@public.gmane.org> @ 2015-03-03 15:18 ` J. Bruce Fields 2015-03-12 15:58 ` Trond Myklebust 1 sibling, 0 replies; 3+ messages in thread From: J. Bruce Fields @ 2015-03-03 15:18 UTC (permalink / raw) To: Nicholas Mc Guire Cc: Trond Myklebust, Anna Schumaker, David S. Miller, linux-nfs-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA I'll assume Trond or Anna gets this one.--b. On Tue, Mar 03, 2015 at 04:24:25AM -0500, Nicholas Mc Guire wrote: > Use jiffies_to_msecs for converting jiffies as it handles all of the corner > cases reliably and also helps readability. > > Signed-off-by: Nicholas Mc Guire <hofrat-Q945KHDl0DbYtjvyW6yDsg@public.gmane.org> > --- > > This was only compile tested for x86_64_defconfig (implies CONFIG_SUNRPC=y) > > Patch is against 4.0-rc1 (localversion-next is -next-20150303) > > net/sunrpc/sched.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c > index b91fd9c..c234e7f 100644 > --- a/net/sunrpc/sched.c > +++ b/net/sunrpc/sched.c > @@ -90,7 +90,7 @@ __rpc_add_timer(struct rpc_wait_queue *queue, struct rpc_task *task) > return; > > dprintk("RPC: %5u setting alarm for %lu ms\n", > - task->tk_pid, task->tk_timeout * 1000 / HZ); > + task->tk_pid, jiffies_to_msecs(task->tk_timeout)); > > task->u.tk_wait.expires = jiffies + task->tk_timeout; > if (list_empty(&queue->timer_list.list) || time_before(task->u.tk_wait.expires, queue->timer_list.expires)) > -- > 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] SUNRPC: use jiffies_to_msecs for converting jiffies [not found] ` <1425374665-446-1-git-send-email-hofrat-Q945KHDl0DbYtjvyW6yDsg@public.gmane.org> 2015-03-03 15:18 ` J. Bruce Fields @ 2015-03-12 15:58 ` Trond Myklebust 1 sibling, 0 replies; 3+ messages in thread From: Trond Myklebust @ 2015-03-12 15:58 UTC (permalink / raw) To: Nicholas Mc Guire Cc: J. Bruce Fields, Anna Schumaker, David S. Miller, linux-nfs-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA On Tue, 2015-03-03 at 04:24 -0500, Nicholas Mc Guire wrote: > Use jiffies_to_msecs for converting jiffies as it handles all of the corner > cases reliably and also helps readability. > > Signed-off-by: Nicholas Mc Guire <hofrat-Q945KHDl0DbYtjvyW6yDsg@public.gmane.org> > --- > > This was only compile tested for x86_64_defconfig (implies CONFIG_SUNRPC=y) > > Patch is against 4.0-rc1 (localversion-next is -next-20150303) > > net/sunrpc/sched.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c > index b91fd9c..c234e7f 100644 > --- a/net/sunrpc/sched.c > +++ b/net/sunrpc/sched.c > @@ -90,7 +90,7 @@ __rpc_add_timer(struct rpc_wait_queue *queue, struct rpc_task *task) > return; > > dprintk("RPC: %5u setting alarm for %lu ms\n", > - task->tk_pid, task->tk_timeout * 1000 / HZ); > + task->tk_pid, jiffies_to_msecs(task->tk_timeout)); > > task->u.tk_wait.expires = jiffies + task->tk_timeout; > if (list_empty(&queue->timer_list.list) || time_before(task->u.tk_wait.expires, queue->timer_list.expires)) Thanks! Applied. -- Trond Myklebust Linux NFS client maintainer, PrimaryData trond.myklebust-7I+n7zu2hftEKMMhf/gKZA@public.gmane.org -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-03-12 15:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-03 9:24 [PATCH] SUNRPC: use jiffies_to_msecs for converting jiffies Nicholas Mc Guire
[not found] ` <1425374665-446-1-git-send-email-hofrat-Q945KHDl0DbYtjvyW6yDsg@public.gmane.org>
2015-03-03 15:18 ` J. Bruce Fields
2015-03-12 15:58 ` Trond Myklebust
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).