nvme-pci: allocate separate interrupt for the reserved non-polled I/O queue
authorJeffle Xu <jefflexu@linux.alibaba.com>
Thu, 24 Sep 2020 07:01:22 +0000 (09:01 +0200)
committerChristoph Hellwig <hch@lst.de>
Sun, 27 Sep 2020 07:14:19 +0000 (09:14 +0200)
commit21cc2f3f799fa228f812f7ab971fa8d43c893392
treecf08907d483076665148fe611e5f829604d5447c
parent936fab503ff4af94f5f9c0b549f3ab4d435500ec
nvme-pci: allocate separate interrupt for the reserved non-polled I/O queue

One queue will be reserved for non-polled IO when nvme.poll_queues is
greater or equal than the number of IO queues that the nvme controller
can provide. Currently the reserved queue for non-polled IO will reuse
the interrupt used by admin queue in this case, e.g, vector 0.

This can work and the performance may not be an issue since the admin
queue is used unfrequently. However this behaviour may be inconsistent
with that when nvme.poll_queues is smaller than the number of IO
queues available.

Thus allocate separate interrupt for this reserved queue, and thus make
the behaviour consistent.

Signed-off-by: Jeffle Xu <jefflexu@linux.alibaba.com>
[hch: minor cleanups, mostly to the pre-existing surrounding code]
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/pci.c