All of lore.kernel.org
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Nicholas Mc Guire <hofrat@osadl.org>
Cc: Trond Myklebust <trond.myklebust@primarydata.com>,
	Anna Schumaker <anna.schumaker@netapp.com>,
	"David S. Miller" <davem@davemloft.net>,
	linux-nfs@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] SUNRPC: use jiffies_to_msecs for converting jiffies
Date: Tue, 3 Mar 2015 10:18:22 -0500	[thread overview]
Message-ID: <20150303151822.GA19439@fieldses.org> (raw)
In-Reply-To: <1425374665-446-1-git-send-email-hofrat@osadl.org>

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@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

WARNING: multiple messages have this Message-ID (diff)
From: "J. Bruce Fields" <bfields-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org>
To: Nicholas Mc Guire <hofrat-Q945KHDl0DbYtjvyW6yDsg@public.gmane.org>
Cc: Trond Myklebust
	<trond.myklebust-7I+n7zu2hftEKMMhf/gKZA@public.gmane.org>,
	Anna Schumaker
	<anna.schumaker-HgOvQuBEEgTQT0dZR+AlfA@public.gmane.org>,
	"David S. Miller" <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>,
	linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] SUNRPC: use jiffies_to_msecs for converting jiffies
Date: Tue, 3 Mar 2015 10:18:22 -0500	[thread overview]
Message-ID: <20150303151822.GA19439@fieldses.org> (raw)
In-Reply-To: <1425374665-446-1-git-send-email-hofrat-Q945KHDl0DbYtjvyW6yDsg@public.gmane.org>

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

  reply	other threads:[~2015-03-03 15:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-03  9:24 [PATCH] SUNRPC: use jiffies_to_msecs for converting jiffies Nicholas Mc Guire
2015-03-03 15:18 ` J. Bruce Fields [this message]
2015-03-03 15:18   ` J. Bruce Fields
2015-03-12 15:58 ` Trond Myklebust
2015-03-12 15:58   ` Trond Myklebust

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=20150303151822.GA19439@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=anna.schumaker@netapp.com \
    --cc=davem@davemloft.net \
    --cc=hofrat@osadl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=trond.myklebust@primarydata.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.