From: Keith Busch <keith.busch@linux.intel.com>
To: Mikulas Patocka <mpatocka@redhat.com>
Cc: Sagi Grimberg <sagi@grimberg.me>,
Ming Lei <tom.leiming@gmail.com>,
linux-nvme <linux-nvme@lists.infradead.org>,
Keith Busch <keith.busch@intel.com>,
linux-pci@vger.kernel.org, Bjorn Helgaas <bhelgaas@google.com>,
Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH] nvme/pci: Use async_schedule for initial reset work
Date: Thu, 3 May 2018 14:15:08 -0600 [thread overview]
Message-ID: <20180503201507.GO5938@localhost.localdomain> (raw)
In-Reply-To: <alpine.LRH.2.02.1805021717430.2705@file01.intranet.prod.int.rdu2.redhat.com>
On Thu, May 03, 2018 at 10:55:09AM -0400, Mikulas Patocka wrote:
> I think there is still one more bug:
>
> If nvme_probe is called, it schedules the asynchronous work using
> async_schedule - now suppose that the pci system calls the "remove",
> "shutdown" or "suspend" method - this method will race with
> nvme_async_probe running in the async domain - that will cause
> misbehavior.
>
> Or - does the PCI subsystem flush the async queues before calling these
> methods? I'm not sure, but it doesn't seem so.
>
> I think, you need to save the cookie returned by async_schedule and wait
> for this cookie with async_synchronize_cookie in the other methods.
I think we're fine as-is without syncing the cookie.
The remove path should be fine since we already sync with the necessary
work queues.
The shutdown, suspend and reset paths will just cause the initial reset
work to end early, the same result as what previously would happen.
next prev parent reply other threads:[~2018-05-03 20:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20180427211708.5604-1-keith.busch@intel.com>
[not found] ` <CACVXFVNXmzMC9N+EabeXs4-XZLCRSOVdpd901wfojBL_s2YFRQ@mail.gmail.com>
[not found] ` <20180430194533.GC5938@localhost.localdomain>
[not found] ` <alpine.LRH.2.02.1805011928470.17838@file01.intranet.prod.int.rdu2.redhat.com>
[not found] ` <20180502152953.GH5938@localhost.localdomain>
2018-05-03 14:55 ` [PATCH] nvme/pci: Use async_schedule for initial reset work Mikulas Patocka
2018-05-03 20:15 ` Keith Busch [this message]
2018-05-03 20:45 ` Mikulas Patocka
2018-05-03 21:05 ` Keith Busch
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=20180503201507.GO5938@localhost.localdomain \
--to=keith.busch@linux.intel.com \
--cc=bhelgaas@google.com \
--cc=hch@lst.de \
--cc=keith.busch@intel.com \
--cc=linux-nvme@lists.infradead.org \
--cc=linux-pci@vger.kernel.org \
--cc=mpatocka@redhat.com \
--cc=sagi@grimberg.me \
--cc=tom.leiming@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;
as well as URLs for NNTP newsgroup(s).