From: keith.busch@intel.com (Keith Busch)
Subject: [PATCH 1/6] nvme: don't disable local ints for polled queue
Date: Wed, 14 Nov 2018 08:37:07 -0700 [thread overview]
Message-ID: <20181114153706.GA11416@localhost.localdomain> (raw)
In-Reply-To: <20181114084322.GA14954@infradead.org>
On Wed, Nov 14, 2018@12:43:22AM -0800, Christoph Hellwig wrote:
> static int nvme_poll_noirq(struct blk_mq_hw_ctx *hctx, unsigned int tag)
> {
> struct nvme_queue *nvmeq = hctx->driver_data;
> > u16 start, end;
> bool found;
> >
> > if (!nvme_cqe_pending(nvmeq))
> > return 0;
> >
> > + spin_lock(&nvmeq->cq_lock);
> > found = nvme_process_cq(nvmeq, &start, &end, tag);
> > + spin_unlock(&nvmeq->cq_lock);
> > +
> > nvme_complete_cqes(nvmeq, start, end);
> > return found;
>
> And while we are at it: I think for the irq-driven queues in a
> separate queue for poll setup we might not even need to take the
> CQ lock. Which might be an argument for only allowing polling
> if we have the separate queues just to keep everything simple.
That's a pretty cool observation. We still poll interrupt driven queues
in the timeout path as a sanity check (it really has helped in debugging
timeout issues), but we can temporarily disable the cq's irq and be
lockless.
next prev parent reply other threads:[~2018-11-14 15:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20181110151317.3813-1-axboe@kernel.dk>
2018-11-10 15:13 ` [PATCH 1/6] nvme: don't disable local ints for polled queue Jens Axboe
2018-11-14 8:43 ` Christoph Hellwig
2018-11-14 15:31 ` Jens Axboe
2018-11-14 15:37 ` Keith Busch [this message]
2018-11-14 10:18 ` Max Gurtovoy
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=20181114153706.GA11416@localhost.localdomain \
--to=keith.busch@intel.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