linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: Sagi Grimberg <sagi@grimberg.me>, linux-nvme@lists.infradead.org
Cc: Keith Busch <keith.busch@intel.com>,
	Christoph Hellwig <hch@lst.de>,
	James Smart <james.smart@broadcom.com>
Subject: Re: [PATCH v4 2/4] nvme: enable aen regardless of the presence of I/O queues
Date: Mon, 9 Sep 2019 13:17:50 +0200	[thread overview]
Message-ID: <12ccd74c-fc67-b8cd-cfba-0525be9dc80e@suse.de> (raw)
In-Reply-To: <20190904215954.15423-3-sagi@grimberg.me>

On 9/4/19 11:59 PM, Sagi Grimberg wrote:
> AENs in general are not related to the presence of I/O queues,
> so enable them regardless. Note that the only exception is that
> discovery controller will not support any of the requested AENs
> and nvme_enable_aen will respect that and return, so it is still
> safe to enable regardless.
> 
> Note it is safe to enable AENs even before the initial namespace
> scanning as we have the scan operation in a workqueue context.
> 
> Reviewed-by: Minwoo Im <minwoo.im.dev@gmail.com>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
> Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
> ---
>  drivers/nvme/host/core.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> index 14c0bfb55615..fccf28d77c03 100644
> --- a/drivers/nvme/host/core.c
> +++ b/drivers/nvme/host/core.c
> @@ -1201,6 +1201,8 @@ static void nvme_enable_aen(struct nvme_ctrl *ctrl)
>  	if (status)
>  		dev_warn(ctrl->device, "Failed to configure AEN (cfg %x)\n",
>  			 supported_aens);
> +
> +	queue_work(nvme_wq, &ctrl->async_event_work);
>  }
>  
>  static int nvme_submit_io(struct nvme_ns *ns, struct nvme_user_io __user *uio)
> @@ -3780,10 +3782,10 @@ void nvme_start_ctrl(struct nvme_ctrl *ctrl)
>  	if (ctrl->kato)
>  		nvme_start_keep_alive(ctrl);
>  
> +	nvme_enable_aen(ctrl);
> +
>  	if (ctrl->queue_count > 1) {
>  		nvme_queue_scan(ctrl);
> -		nvme_enable_aen(ctrl);
> -		queue_work(nvme_wq, &ctrl->async_event_work);
>  		nvme_start_queues(ctrl);
>  	}
>  }
> 
Reviewed-by: Hannes Reinecke <hare@suse.com>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		      Teamlead Storage & Networking
hare@suse.de			                  +49 911 74053 688
SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 247165 (AG München), GF: Felix Imendörffer

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

  reply	other threads:[~2019-09-09 11:18 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-04 21:59 [PATCH v4 0/4] Support discovery log change events Sagi Grimberg
2019-09-04 21:59 ` [PATCH v4 1/4] nvme-fabrics: allow discovery subsystems accept a kato Sagi Grimberg
2019-09-09 16:47   ` Chaitanya Kulkarni
2019-09-04 21:59 ` [PATCH v4 2/4] nvme: enable aen regardless of the presence of I/O queues Sagi Grimberg
2019-09-09 11:17   ` Hannes Reinecke [this message]
2019-09-09 16:48   ` Chaitanya Kulkarni
2019-09-04 21:59 ` [PATCH v4 3/4] nvme: add uevent variables for controller devices Sagi Grimberg
2019-09-04 23:17   ` James Smart
2019-09-05  0:18     ` Sagi Grimberg
2019-09-05 16:00       ` James Smart
2019-09-05 20:06         ` Sagi Grimberg
2019-09-06 12:59   ` Christoph Hellwig
2019-09-06 18:07     ` Sagi Grimberg
2019-09-09 11:18   ` Hannes Reinecke
2019-09-04 21:59 ` [PATCH v4 4/4] nvme: send discovery log page change events to userspace Sagi Grimberg
2019-09-06 13:00   ` Christoph Hellwig
2019-09-09 16:50   ` Chaitanya Kulkarni
2019-09-04 21:59 ` [PATCH v4 5/4 nvme-cli] udev: convert the discovery event handler to the kernel support 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=12ccd74c-fc67-b8cd-cfba-0525be9dc80e@suse.de \
    --to=hare@suse.de \
    --cc=hch@lst.de \
    --cc=james.smart@broadcom.com \
    --cc=keith.busch@intel.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).