Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: keith.busch@intel.com (Keith Busch)
Subject: [PATCH v3] nvme: Honor RTD3 Entry Latency for shutdowns
Date: Fri, 25 Aug 2017 15:56:05 -0400	[thread overview]
Message-ID: <20170825195605.GC1207@localhost.localdomain> (raw)
In-Reply-To: <20170825022641.1424-1-martin.petersen@oracle.com>

On Thu, Aug 24, 2017@10:26:41PM -0400, Martin K. Petersen wrote:
> +	transition_time = le32_to_cpu(id->rtd3e);
> +	if (transition_time) {
> +		do_div(transition_time, 1000000); /* us -> s */
> +		clamp(transition_time, shutdown_timeout, 60); /* max 60s */
> +		ctrl->shutdown_timeout = transition_time;

My first experience with the kernel's 'clamp', so I had to look up that
macro. The above does not appear to fit the usage since 'clamp' returns
a value rather than directly clamp the parameter; I think it should be:

	transition_time = clamp(transition_time, shutdown_timeout, 60);

  parent reply	other threads:[~2017-08-25 19:56 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-16 19:55 [PATCH] nvme: Honor RTD3 Entry Latency for shutdowns Martin K. Petersen
2017-08-16 20:25 ` Scott Bauer
2017-08-16 20:49   ` Martin K. Petersen
2017-08-17 15:01     ` Keith Busch
2017-08-17 17:06       ` Martin K. Petersen
2017-08-17 17:42         ` Scott Bauer
2017-08-23 22:32           ` [PATCH v2] " Martin K. Petersen
2017-08-24  9:02             ` Christoph Hellwig
2017-08-25  2:26               ` Martin K. Petersen
2017-08-25  2:26               ` [PATCH v3] " Martin K. Petersen
2017-08-25  7:41                 ` Christoph Hellwig
2017-08-25 14:15                   ` Martin K. Petersen
2017-08-25 19:56                 ` Keith Busch [this message]
2017-08-25 23:14                   ` [PATCH v4] " Martin K. Petersen
2017-08-28  6:05                     ` Sagi Grimberg
2017-08-28 14:22                     ` Keith Busch
2017-08-25 23:16                   ` [PATCH v3] " Martin K. Petersen

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=20170825195605.GC1207@localhost.localdomain \
    --to=keith.busch@intel.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