From: axboe@fb.com (Jens Axboe)
Subject: [PATCH v4] nvme: Remove RCU namespace protection
Date: Thu, 14 Jul 2016 08:51:45 -0700 [thread overview]
Message-ID: <5787B511.2010107@fb.com> (raw)
In-Reply-To: <1468431902-9699-1-git-send-email-keith.busch@intel.com>
On 07/13/2016 10:45 AM, Keith Busch wrote:
> We can't sleep with RCU read lock held, but we need to do potentially
> blocking stuff to namespace queues when iterating the list. This patch
> removes the RCU locking and holds a mutex instead.
>
> To prevent deadlocks, this patch removes holding the mutex during
> namespace scanning and removal. The unlocked namespace scanning is made
> safe by holding a reference to the namespace being scanned.
>
> List iteration that does IO has to be unlocked to allow error recovery.
> The caller must ensure the list can not be manipulated during such an
> event, so this patch adds a comment explaining this requirement to the
> only function that iterates an unlocked list. All callers currently
> meet this requirement, so no further changes required.
>
> List iterations that do not do IO can safely use the lock since it couldn't
> block recovery from missing forced IO completions.
Added for 4.7. And thankfully, looks like we're dodging most of the
merging bullet here.
--
Jens Axboe
prev parent reply other threads:[~2016-07-14 15:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-13 17:45 [PATCH v4] nvme: Remove RCU namespace protection Keith Busch
2016-07-14 15:51 ` 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=5787B511.2010107@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;
as well as URLs for NNTP newsgroup(s).