From: zhangweiping@didichuxing.com (weiping zhang)
Subject: [PATCH] nvme-pci: add module parameter for io queue depth
Date: Fri, 7 Jul 2017 17:05:47 +0800 [thread overview]
Message-ID: <20170707090547.GA2420@localhost.didichuxing.com> (raw)
Adjust io queue depth more easily.
Signed-off-by: weiping zhang <zhangweiping at didichuxing.com>
---
drivers/nvme/host/pci.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 951042a..f1ac0f8 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -48,7 +48,6 @@
#include "nvme.h"
-#define NVME_Q_DEPTH 1024
#define NVME_AQ_DEPTH 256
#define SQ_SIZE(depth) (depth * sizeof(struct nvme_command))
#define CQ_SIZE(depth) (depth * sizeof(struct nvme_completion))
@@ -66,6 +65,10 @@ static bool use_cmb_sqes = true;
module_param(use_cmb_sqes, bool, 0644);
MODULE_PARM_DESC(use_cmb_sqes, "use controller's memory buffer for I/O SQes");
+static int io_queue_depth = 1024;
+module_param(io_queue_depth, int, 0644);
+MODULE_PARM_DESC(io_queue_depth, "set io queue depth");
+
static struct workqueue_struct *nvme_workq;
struct nvme_dev;
@@ -1730,7 +1733,7 @@ static int nvme_pci_enable(struct nvme_dev *dev)
cap = lo_hi_readq(dev->bar + NVME_REG_CAP);
- dev->q_depth = min_t(int, NVME_CAP_MQES(cap) + 1, NVME_Q_DEPTH);
+ dev->q_depth = min_t(int, NVME_CAP_MQES(cap) + 1, io_queue_depth);
dev->db_stride = 1 << NVME_CAP_STRIDE(cap);
dev->dbs = dev->bar + 4096;
--
2.9.4
next reply other threads:[~2017-07-07 9:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-07 9:05 weiping zhang [this message]
2017-07-07 13:50 ` [PATCH] nvme-pci: add module parameter for io queue depth Christoph Hellwig
2017-07-07 14:56 ` Jens Axboe
2017-07-07 14:56 ` Jens Axboe
2017-07-07 15:29 ` Keith Busch
2017-07-07 16:53 ` weiping zhang
2017-07-10 5:54 ` Sagi Grimberg
2017-07-10 8:02 ` weiping zhang
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=20170707090547.GA2420@localhost.didichuxing.com \
--to=zhangweiping@didichuxing.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.