From: Keith Busch <kbusch@kernel.org>
To: Sagi Grimberg <sagi@grimberg.me>
Cc: Keith Busch <kbusch@fb.com>, linux-nvme@lists.infradead.org, hch@lst.de
Subject: Re: [PATCH] nvme: requeue aen after firmware activation
Date: Tue, 6 Sep 2022 09:09:12 -0600 [thread overview]
Message-ID: <YxdimKNsMzSN0qjb@kbusch-mbp.dhcp.thefacebook.com> (raw)
In-Reply-To: <0a040337-4be7-f57b-597b-a90afd4206cf@grimberg.me>
On Mon, Sep 05, 2022 at 12:10:24PM +0300, Sagi Grimberg wrote:
>
>
> On 9/1/22 18:30, Keith Busch wrote:
> > From: Keith Busch <kbusch@kernel.org>
> >
> > The driver prevents async event work while handling a processing paused
> > event, but someone needs to restart it after the controller returns to a
> > live state.
> >
> > Link: https://bugzilla.kernel.org/show_bug.cgi?id=216400
> > Signed-off-by: Keith Busch <kbusch@kernel.org>
> > ---
> > drivers/nvme/host/core.c | 14 +++++++++++---
> > 1 file changed, 11 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> > index af367b22871b..66446f1e06cf 100644
> > --- a/drivers/nvme/host/core.c
> > +++ b/drivers/nvme/host/core.c
> > @@ -4703,6 +4703,8 @@ static void nvme_fw_act_work(struct work_struct *work)
> > nvme_start_queues(ctrl);
> > /* read FW slot information to clear the AER */
> > nvme_get_fw_slot_info(ctrl);
> > +
> > + queue_work(nvme_wq, &ctrl->async_event_work);
>
> Why is the rest below needed? why is this not enough? Also a code
> comment would help here...
We can only allow one thread to queue the work because no one is tracking
outstanding command id's on AEN commands. If nvme_fw_act_work needs to take
responsibility to restart the async_event_work, then we can't let the previous
handler also attempt to requeue it.
next prev parent reply other threads:[~2022-09-06 15:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-01 15:30 [PATCH] nvme: requeue aen after firmware activation Keith Busch
2022-09-05 9:10 ` Sagi Grimberg
2022-09-06 15:09 ` Keith Busch [this message]
2022-09-07 6:39 ` Christoph Hellwig
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=YxdimKNsMzSN0qjb@kbusch-mbp.dhcp.thefacebook.com \
--to=kbusch@kernel.org \
--cc=hch@lst.de \
--cc=kbusch@fb.com \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
/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).