From: hch@lst.de (Christoph Hellwig)
Subject: [PATCH] nvme-pci: only set nr_maps to 2 if poll queues are supported
Date: Fri, 14 Dec 2018 16:42:33 +0100 [thread overview]
Message-ID: <20181214154233.14354-1-hch@lst.de> (raw)
The block layer now enables polling support on a queue if nr_maps
includes the poll map, so we should only set that if we actually
support poll queues.
Signed-off-by: Christoph Hellwig <hch at lst.de>
---
drivers/nvme/host/pci.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index fb9d8270f32c..8b62d0075e48 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -2293,6 +2293,9 @@ static int nvme_dev_add(struct nvme_dev *dev)
if (!dev->ctrl.tagset) {
dev->tagset.ops = &nvme_mq_ops;
dev->tagset.nr_hw_queues = dev->online_queues - 1;
+ dev->tagset.nr_maps = 2; /* default + read */
+ if (dev->io_queues[HCTX_TYPE_POLL])
+ dev->tagset.nr_maps++;
dev->tagset.nr_maps = HCTX_MAX_TYPES;
dev->tagset.timeout = NVME_IO_TIMEOUT;
dev->tagset.numa_node = dev_to_node(dev->dev);
--
2.19.2
next reply other threads:[~2018-12-14 15:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-14 15:42 Christoph Hellwig [this message]
2018-12-14 15:45 ` [PATCH] nvme-pci: only set nr_maps to 2 if poll queues are supported Jens Axboe
-- strict thread matches above, loose matches on Subject: below --
2018-12-14 16:20 Christoph Hellwig
2018-12-14 16:47 ` Jens Axboe
2018-12-14 16:49 ` Christoph Hellwig
2018-12-14 16:49 ` Jens Axboe
2018-12-14 18:43 ` Sagi Grimberg
2018-12-14 18:50 ` Jens Axboe
2018-12-14 19:01 ` Sagi Grimberg
2018-12-14 19:36 ` Jens Axboe
2018-12-14 19:49 ` Sagi Grimberg
2018-12-15 1:14 ` Sagi Grimberg
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=20181214154233.14354-1-hch@lst.de \
--to=hch@lst.de \
/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