[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250407180704.GB1759834@nvidia.com>
Date: Mon, 7 Apr 2025 15:07:04 -0300
From: Jason Gunthorpe <jgg@...dia.com>
To: ye.xingchen@....com.cn
Cc: leon@...nel.org, yishaih@...dia.com, linux-rdma@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] RDMA: Replace msecs_to_jiffies with secs_to_jiffies for timeout
On Wed, Mar 26, 2025 at 10:19:55PM +0800, ye.xingchen@....com.cn wrote:
> From: Peng Jiang <jiang.peng9@....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@....com.cn>
> Signed-off-by: Ye Xingchen <ye.xingchen@....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
Powered by blists - more mailing lists