linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Easwar Hariharan <eahariha@linux.microsoft.com>
To: Leon Romanovsky <leon@kernel.org>
Cc: eahariha@linux.microsoft.com, Yishai Hadas <yishaih@nvidia.com>,
	Jason Gunthorpe <jgg@ziepe.ca>,
	linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/2] rdma: Converge on using secs_to_jiffies()
Date: Thu, 20 Feb 2025 08:17:31 -0800	[thread overview]
Message-ID: <bfd711f3-2de6-44d0-afe9-e24470448011@linux.microsoft.com> (raw)
In-Reply-To: <20250220070729.GK53094@unreal>

On 2/19/2025 11:07 PM, Leon Romanovsky wrote:
> On Wed, Feb 19, 2025 at 09:36:38PM +0000, Easwar Hariharan wrote:
>> This series converts users of msecs_to_jiffies() that either use the
>> multiply pattern of either of:
>> - msecs_to_jiffies(N*1000) or
>> - msecs_to_jiffies(N*MSEC_PER_SEC)
>>
>> where N is a constant or an expression, to avoid the multiplication.
> 
> Can you please provide justification for that? What is wrong with current code?
> 

There is nothing specifically wrong with the current code, it just does an unnecessary
multiplication for what it does, as the cover letter mentions. IMHO, it's also more readable
to just see secs_to_jiffies(30) and understand that it's a 30 second timeout.

Thanks,
Easwar (he/him)



  reply	other threads:[~2025-02-20 16:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-19 21:36 [PATCH 0/2] rdma: Converge on using secs_to_jiffies() Easwar Hariharan
2025-02-19 21:36 ` [PATCH 1/2] RDMA/mlx4: convert timeouts to secs_to_jiffies() Easwar Hariharan
2025-02-19 21:36 ` [PATCH 2/2] RDMA/mlx5: " Easwar Hariharan
2025-04-07 18:06   ` Jason Gunthorpe
2025-02-20  7:07 ` [PATCH 0/2] rdma: Converge on using secs_to_jiffies() Leon Romanovsky
2025-02-20 16:17   ` Easwar Hariharan [this message]
2025-02-22 18:13     ` Leon Romanovsky

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=bfd711f3-2de6-44d0-afe9-e24470448011@linux.microsoft.com \
    --to=eahariha@linux.microsoft.com \
    --cc=jgg@ziepe.ca \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).