From: JeffleXu <jefflexu@linux.alibaba.com>
To: axboe@fb.com, hch@lst.de
Cc: joseph.qi@linux.alibaba.com, linux-nvme@lists.infradead.org,
xiaoguang.wang@linux.alibaba.com
Subject: Re: [RFC] nvme/pci: allocate separate interrupt for reserved non-polled IO queue
Date: Thu, 24 Sep 2020 14:14:18 +0800 [thread overview]
Message-ID: <f1696d27-0e35-5f10-59d8-e09b046a64a5@linux.alibaba.com> (raw)
In-Reply-To: <20200922042816.92192-1-jefflexu@linux.alibaba.com>
Any comments?
On 9/22/20 12:28 PM, Jeffle Xu wrote:
> 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>
> ---
> drivers/nvme/host/pci.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
> index 899d2f4d7ab6..ff3e28a8a9e0 100644
> --- a/drivers/nvme/host/pci.c
> +++ b/drivers/nvme/host/pci.c
> @@ -2042,12 +2042,14 @@ static int nvme_setup_irqs(struct nvme_dev *dev, unsigned int nr_io_queues)
>
> /*
> * Poll queues don't need interrupts, but we need at least one IO
> - * queue left over for non-polled IO.
> + * queue left over for non-polled IO. Also one interrupt for admin
> + * queue.
> */
> this_p_queues = dev->nr_poll_queues;
> if (this_p_queues >= nr_io_queues) {
> this_p_queues = nr_io_queues - 1;
> - irq_queues = 1;
> + /* Allocate separate interrupt for reserved non-polled IO queue. */
> + irq_queues = 2;
> } else {
> irq_queues = nr_io_queues - this_p_queues + 1;
> }
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
next prev parent reply other threads:[~2020-09-24 6:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-22 4:28 [RFC] nvme/pci: allocate separate interrupt for reserved non-polled IO queue Jeffle Xu
2020-09-24 6:14 ` JeffleXu [this message]
2020-09-24 7:04 ` Christoph Hellwig
2020-09-24 8:51 ` JeffleXu
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=f1696d27-0e35-5f10-59d8-e09b046a64a5@linux.alibaba.com \
--to=jefflexu@linux.alibaba.com \
--cc=axboe@fb.com \
--cc=hch@lst.de \
--cc=joseph.qi@linux.alibaba.com \
--cc=linux-nvme@lists.infradead.org \
--cc=xiaoguang.wang@linux.alibaba.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