From: hch@infradead.org (Christoph Hellwig)
Subject: [RFC PATCH] nvme: Submit uevents for log page notification
Date: Wed, 14 Jun 2017 08:05:46 -0700 [thread overview]
Message-ID: <20170614150546.GA32323@infradead.org> (raw)
In-Reply-To: <20170330083609.GD11540@lst.de>
Given that we have the uevent discussion again can you resubmit this
with the comments address, most notably only enabling it for the
uevents we want userspace to handle. Maybe including whatever
code you have on the userspace side (even if it's an ugly prototype)
On Thu, Mar 30, 2017@10:36:09AM +0200, Christoph Hellwig wrote:
> The uevent itself looks fine to me, but we really need to figure out
> how we can clear log pages in kernel space where needed.
>
> We should already be doing this for the namespace changed one, and
> it will be very important at least for ANA as well.
>
>
> A few more mechanical code comments below:
>
>
> > +void nvme_uevent_work(struct nvme_ctrl *ctrl, int log)
>
> static?
>
> > {
> > u32 result = le32_to_cpu(res->u32);
> > + u8 log_page = (result >> 16) & 8;
> > + u8 event_type = result & 7;
> > bool done = true;
> >
> > switch (le16_to_cpu(status) >> 1) {
> > @@ -2173,7 +2202,6 @@ void nvme_complete_async_event(struct nvme_ctrl *ctrl, __le16 status,
> > /*FALLTHRU*/
> > case NVME_SC_ABORT_REQ:
> > ++ctrl->event_limit;
> > - schedule_work(&ctrl->async_event_work);
>
> This seems to disable any action on AERs in the kernel..
>
> > diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c
> > index 9690beb..3930a12 100644
> > --- a/drivers/nvme/host/fc.c
> > +++ b/drivers/nvme/host/fc.c
> > @@ -1936,6 +1936,8 @@ nvme_fc_complete_rq(struct request *rq)
> > nvme_requeue_req(rq);
> > return;
> > }
> > + if (req->errors & NVME_SC_MORE)
> > + nvme_uevent(&dev->ctrl, NVME_LOG_ERROR);
> >
> > if (blk_rq_is_passthrough(rq))
> > error = rq->errors;
>
> We'll really need to factor the common request completion code
> into a helper in common code first..
>
> > diff --git a/include/linux/nvme.h b/include/linux/nvme.h
> > index c43d435..e711de6 100644
> > --- a/include/linux/nvme.h
> > +++ b/include/linux/nvme.h
> > @@ -16,6 +16,7 @@
> > #define _LINUX_NVME_H
> >
> > #include <linux/types.h>
> > +#include <linux/kfifo.h>
>
> This should move to drivers/nvme/host/nvme.h instead.
>
> _______________________________________________
> Linux-nvme mailing list
> Linux-nvme at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-nvme
---end quoted text---
next prev parent reply other threads:[~2017-06-14 15:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-24 20:49 [RFC PATCH] nvme: Submit uevents for log page notification Keith Busch
2017-03-30 8:36 ` Christoph Hellwig
2017-06-14 15:05 ` Christoph Hellwig [this message]
2017-06-14 15:42 ` Keith Busch
2017-06-15 9:41 ` Sagi Grimberg
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=20170614150546.GA32323@infradead.org \
--to=hch@infradead.org \
/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).