From: axboe@fb.com (Jens Axboe)
Subject: [PATCH] NVMe: limit max completion iterations in nvme_process_cq()
Date: Fri, 14 Nov 2014 11:00:39 -0700 [thread overview]
Message-ID: <54664347.9030106@fb.com> (raw)
In-Reply-To: <alpine.LNX.2.00.1411141749470.4225@localhost.lm.intel.com>
On 11/14/2014 10:56 AM, Keith Busch wrote:
> On Fri, 14 Nov 2014, Jens Axboe wrote:
>> This is an unbounded loop. If we have per-cpu queues this is
>> usually not a problem, but if CPUs share a queue, then we could
>> have some of them continually queueing IO and the loop could take
>> forever to exit.
>>
>> Limit max iterations to the queue depth of the given completion
>> queue, which seems like a nice number to use.
>
> I think the loop implicitly already has the same max iteration: the
> queue lock is held when it's called, so new commands can't be posted on
> the submission queue while the completions are reaped, so we can't loop
> more than the depth.
That's a good point, since we need the same queue lock to submit a new
command. Disregard!
--
Jens Axboe
prev parent reply other threads:[~2014-11-14 18:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-14 16:48 [PATCH] NVMe: limit max completion iterations in nvme_process_cq() Jens Axboe
2014-11-14 17:56 ` Keith Busch
2014-11-14 18:00 ` Jens Axboe [this message]
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=54664347.9030106@fb.com \
--to=axboe@fb.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