mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: ye.xingchen@zte.com.cn
Cc: leon@kernel.org, yishaih@nvidia.com, linux-rdma@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] RDMA: Replace msecs_to_jiffies with secs_to_jiffies for timeout
Date: Mon, 7 Apr 2025 15:07:04 -0300	[thread overview]
Message-ID: <20250407180704.GB1759834@nvidia.com> (raw)
In-Reply-To: <20250326221955611qu6Ix3Pt5WgKvhL6sTySX@zte.com.cn>

On Wed, Mar 26, 2025 at 10:19:55PM +0800, ye.xingchen@zte.com.cn wrote:
> From: Peng Jiang <jiang.peng9@zte.com.cn>
> 
> In drivers/infiniband/hw/mlx4/mcg.c and drivers/infiniband/hw/mlx5/mr.c,
> `msecs_to_jiffies` is used to convert milliseconds to jiffies.
> For constant milliseconds, using `msecs_to_jiffies` introduces additional
> computational overhead. For example, it is unnecessary to check
> if m > jiffies_to_msecs(MAX_JIFFY_OFFSET) or (int)m < 0 for constants,
> while using `secs_to_jiffies` can avoid these extra calculations.
> 
> Signed-off-by: Peng Jiang <jiang.peng9@zte.com.cn>
> Signed-off-by: Ye Xingchen <ye.xingchen@zte.com.cn>
> ---
>  drivers/infiniband/hw/mlx4/mcg.c | 8 ++++----
>  drivers/infiniband/hw/mlx5/mr.c  | 6 +++---
>  2 files changed, 7 insertions(+), 7 deletions(-)

Applied without the mlx5 portion, Easwar got there first, thanks

Jason

      reply	other threads:[~2025-04-07 18:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-26 14:19 ye.xingchen
2025-04-07 18:07 ` Jason Gunthorpe [this message]

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=20250407180704.GB1759834@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=ye.xingchen@zte.com.cn \
    --cc=yishaih@nvidia.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®