diff options
author | Keith Busch <kbusch@kernel.org> | 2019-12-06 08:11:17 +0900 |
---|---|---|
committer | Keith Busch <kbusch@kernel.org> | 2019-12-07 02:52:47 +0900 |
commit | 7e4c6b9a5d22485acf009b3c3510a370f096dd54 (patch) | |
tree | eb93ff6c8336762b8ebac44703bb7a6d5f165d01 /drivers/nvme/host | |
parent | 17c3316734ae2e51f74078cd955ab855caea7d73 (diff) | |
download | linux-7e4c6b9a5d22485acf009b3c3510a370f096dd54.tar.gz linux-7e4c6b9a5d22485acf009b3c3510a370f096dd54.tar.bz2 linux-7e4c6b9a5d22485acf009b3c3510a370f096dd54.zip |
nvme/pci: Fix read queue count
If nvme.write_queues equals the number of CPUs, the driver had decreased
the number of interrupts available such that there could only be one read
queue even if the controller could support more. Remove the interrupt
count reduction in this case. The driver wouldn't request more IRQs than
it wants queues anyway.
Reviewed-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Diffstat (limited to 'drivers/nvme/host')
-rw-r--r-- | drivers/nvme/host/pci.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index fe81e1581e5f..365a2ddbeaa7 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -2054,7 +2054,6 @@ static int nvme_setup_irqs(struct nvme_dev *dev, unsigned int nr_io_queues) .priv = dev, }; unsigned int irq_queues, this_p_queues; - unsigned int nr_cpus = num_possible_cpus(); /* * Poll queues don't need interrupts, but we need at least one IO @@ -2065,10 +2064,7 @@ static int nvme_setup_irqs(struct nvme_dev *dev, unsigned int nr_io_queues) this_p_queues = nr_io_queues - 1; irq_queues = 1; } else { - if (nr_cpus < nr_io_queues - this_p_queues) - irq_queues = nr_cpus + 1; - else - irq_queues = nr_io_queues - this_p_queues + 1; + irq_queues = nr_io_queues - this_p_queues + 1; } dev->io_queues[HCTX_TYPE_POLL] = this_p_queues; |