From: minwoo.im.dev@gmail.com (Minwoo Im)
Subject: [PATCH] nvme-loop: Fix race between completions and shutdown
Date: Tue, 7 May 2019 01:25:58 +0900 [thread overview]
Message-ID: <bcef79ca-8761-ed06-240b-15c235a7b7f4@gmail.com> (raw)
In-Reply-To: <20190506155632.GA2219@localhost.localdomain>
On 5/7/19 12:56 AM, Keith Busch wrote:
> On Tue, May 07, 2019@12:52:34AM +0900, Minwoo Im wrote:
>>
>> I think it's possible to happen in nvme-pci also. When a CPU is handling a
>> request completed with nvme_complete_rq(), the controller reset by sysfs can
>> occur. In this case, blk_mq_tagset_busy_iter() will iterate over the
>> requests allocated in nvme_dev_disable().
>>
>> Does nvme-pci host driver handle this kind of situation ?
>
> Yes, we have barriers that ensure no other thread can be operating on
> a completion queue entry at the point we iterate the tagset.
Keith,
I should have looked at nvme-pci first much more deeply. Thanks for
teaching me this. Now I might be going to prepare a V2 patch with the
lock mechanism to avoid this situation.
Thanks,
prev parent reply other threads:[~2019-05-06 16:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-06 14:52 [PATCH] nvme-loop: Fix race between completions and shutdown Minwoo Im
2019-05-06 14:53 ` Keith Busch
2019-05-06 15:07 ` Minwoo Im
2019-05-06 15:17 ` Keith Busch
2019-05-06 15:46 ` Minwoo Im
2019-05-06 15:52 ` Minwoo Im
2019-05-06 15:56 ` Keith Busch
2019-05-06 16:25 ` Minwoo Im [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=bcef79ca-8761-ed06-240b-15c235a7b7f4@gmail.com \
--to=minwoo.im.dev@gmail.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