Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: keith.busch@intel.com (Keith Busch)
Subject: [PATCH] NVMe: Increase shutdown complete time
Date: Thu, 3 Apr 2014 17:12:34 -0600 (MDT)	[thread overview]
Message-ID: <alpine.LRH.2.03.1404031709520.4731@AMR> (raw)
In-Reply-To: <90064137F935C142B4B98BA318BB81A301DA530C@GREEN-CLEX.greenliant.com>

On Thu, 3 Apr 2014, Yung-Chin Chen wrote:
> Why do we choose 5 seconds? Are we able to make this parameter
> configurable? Thanks.

This is the second time I've been asked this in two days. :)

Any thoughts on something like the following?

diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c
index 59e2adcc..6ade8de 100644
--- a/drivers/block/nvme-core.c
+++ b/drivers/block/nvme-core.c
@@ -51,6 +51,10 @@
  #define ADMIN_TIMEOUT	(60 * HZ)

+int nvme_io_timeout = 5;
+module_param(nvme_io_timeout, int, 0);
+MODULE_PARM_DESC(nvme_io_timeout, "timeout in seconds for io submitted to queue");
+
  static int nvme_major;
  module_param(nvme_major, int, 0);

diff --git a/include/linux/nvme.h b/include/linux/nvme.h
index 5993455..490488e 100644
--- a/include/linux/nvme.h
+++ b/include/linux/nvme.h
@@ -66,7 +66,8 @@ enum {

  #define NVME_VS(major, minor)	(major << 16 | minor)

-#define NVME_IO_TIMEOUT	(5 * HZ)
+extern int nvme_io_timeout;
+#define NVME_IO_TIMEOUT	(nvme_io_timeout * HZ)

  /*
   * Represents an NVM Express device.  Each nvme_dev is a PCI function.

  reply	other threads:[~2014-04-03 23:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-31 16:24 [PATCH] NVMe: Increase shutdown complete time Keith Busch
2014-03-31 18:56 ` Dan McLeran
2014-03-31 20:37   ` Robles, Raymond C
2014-03-31 23:57     ` Dan McLeran
2014-04-03 22:55       ` Yung-Chin Chen
2014-04-03 23:12         ` Keith Busch [this message]
2014-04-04  0:18           ` Yung-Chin Chen
2014-04-04 15:33             ` Keith Busch
2014-04-04  3:23           ` Dan McLeran
2014-04-04 16:31           ` Matthew Wilcox
2014-04-04 15:22 ` Laura Jessen-SSI
2014-04-04 15:36   ` Keith Busch

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=alpine.LRH.2.03.1404031709520.4731@AMR \
    --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