From: minwoo.im.dev@gmail.com (Minwoo Im)
Subject: [PATCH 2/3] nvme-pci: remove queue_count_ops for write,poll_queues
Date: Sun, 9 Jun 2019 03:02:18 +0900 [thread overview]
Message-ID: <20190608180219.17523-3-minwoo.im.dev@gmail.com> (raw)
In-Reply-To: <20190608180219.17523-1-minwoo.im.dev@gmail.com>
queue_count_set() seems like that it has been provided to limit the
number of queue entries for write/poll queues. But, the
queue_count_set() has been doing nothing but a parameter check even it
has num_possible_cpus() which is nop.
This patch removes entire queue_count_ops from the write_queues and
poll_queues.
Cc: Jens Axboe <axboe at fb.com>
Cc: Ming Lei <ming.lei at redhat.com>
Cc: Keith Busch <kbusch at kernel.org>
Cc: Christoph Hellwig <hch at lst.de>
Cc: Sagi Grimberg <sagi at grimberg.me>
Signed-off-by: Minwoo Im <minwoo.im.dev at gmail.com>
---
drivers/nvme/host/pci.c | 23 ++---------------------
1 file changed, 2 insertions(+), 21 deletions(-)
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 047785023892..20193b11ab0d 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -68,20 +68,14 @@ static int io_queue_depth = 1024;
module_param_cb(io_queue_depth, &io_queue_depth_ops, &io_queue_depth, 0644);
MODULE_PARM_DESC(io_queue_depth, "set io queue depth, should >= 2");
-static int queue_count_set(const char *val, const struct kernel_param *kp);
-static const struct kernel_param_ops queue_count_ops = {
- .set = queue_count_set,
- .get = param_get_int,
-};
-
static int write_queues;
-module_param_cb(write_queues, &queue_count_ops, &write_queues, 0644);
+module_param(write_queues, int, 0644);
MODULE_PARM_DESC(write_queues,
"Number of queues to use for writes. If not set, reads and writes "
"will share a queue set.");
static int poll_queues;
-module_param_cb(poll_queues, &queue_count_ops, &poll_queues, 0644);
+module_param(poll_queues, int, 0644);
MODULE_PARM_DESC(poll_queues, "Number of queues to use for polled IO.");
struct nvme_dev;
@@ -146,19 +140,6 @@ static int io_queue_depth_set(const char *val, const struct kernel_param *kp)
return param_set_int(val, kp);
}
-static int queue_count_set(const char *val, const struct kernel_param *kp)
-{
- int n, ret;
-
- ret = kstrtoint(val, 10, &n);
- if (ret)
- return ret;
- if (n > num_possible_cpus())
- n = num_possible_cpus();
-
- return param_set_int(val, kp);
-}
-
static inline unsigned int sq_idx(unsigned int qid, u32 stride)
{
return qid * 2 * stride;
--
2.21.0
next prev parent reply other threads:[~2019-06-08 18:02 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-08 18:02 [PATCH 0/3] nvme-pci: adjust irq max_vector to avoid WARN() Minwoo Im
2019-06-08 18:02 ` [PATCH 1/3] nvme-pci: remove unnecessary zero for static var Minwoo Im
2019-06-08 20:27 ` Chaitanya Kulkarni
2019-06-08 18:02 ` Minwoo Im [this message]
2019-06-10 1:51 ` [PATCH 2/3] nvme-pci: remove queue_count_ops for write,poll_queues Ming Lei
2019-06-10 2:25 ` Minwoo Im
2019-06-10 2:41 ` Ming Lei
2019-06-10 3:41 ` Minwoo Im
2019-06-10 3:49 ` [PATCH 2/3] nvme-pci: remove queue_count_ops for write, poll_queues Ming Lei
2019-06-10 3:52 ` Minwoo Im
2019-06-16 4:51 ` [PATCH 2/3] nvme-pci: remove queue_count_ops for write,poll_queues Minwoo Im
2019-06-20 6:25 ` Christoph Hellwig
2019-06-08 18:02 ` [PATCH 3/3] nvme-pci: adjust irq max_vector using num_possible_cpus() Minwoo Im
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=20190608180219.17523-3-minwoo.im.dev@gmail.com \
--to=minwoo.im.dev@gmail.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