Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: keith.busch@intel.com (Keith Busch)
Subject: [PATCH 1/6] nvme-pci: move clearing host mem behind stopping queues
Date: Fri, 2 Feb 2018 11:46:05 -0700	[thread overview]
Message-ID: <20180202184605.GJ24417@localhost.localdomain> (raw)
In-Reply-To: <1517554849-7802-2-git-send-email-jianchao.w.wang@oracle.com>

On Fri, Feb 02, 2018@03:00:44PM +0800, Jianchao Wang wrote:
> Move clearing host mem behind stopping queues. Prepare for
> following patch which will grab all the outstanding requests.
> 
> Signed-off-by: Jianchao Wang <jianchao.w.wang at oracle.com>

This one makes sense, though I would alter the change log to something
like:

  This patch quiecses new IO prior to disabling device HMB access.
  A controller using HMB may be relying on it to efficiently complete
  IO commands.

Reviewed-by: Keith Busch <keith.busch at intel.com>

> ---
>  drivers/nvme/host/pci.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
> index 6fe7af0..00cffed 100644
> --- a/drivers/nvme/host/pci.c
> +++ b/drivers/nvme/host/pci.c
> @@ -2186,7 +2186,10 @@ static void nvme_dev_disable(struct nvme_dev *dev, bool shutdown)
>  	if (!dead) {
>  		if (shutdown)
>  			nvme_wait_freeze_timeout(&dev->ctrl, NVME_IO_TIMEOUT);
> +	}
> +	nvme_stop_queues(&dev->ctrl);
>  
> +	if (!dead) {
>  		/*
>  		 * If the controller is still alive tell it to stop using the
>  		 * host memory buffer.  In theory the shutdown / reset should
> @@ -2195,11 +2198,6 @@ static void nvme_dev_disable(struct nvme_dev *dev, bool shutdown)
>  		 */
>  		if (dev->host_mem_descs)
>  			nvme_set_host_mem(dev, 0);
> -
> -	}
> -	nvme_stop_queues(&dev->ctrl);
> -
> -	if (!dead) {
>  		nvme_disable_io_queues(dev);
>  		nvme_disable_admin_queue(dev, shutdown);
>  	}
> -- 
> 2.7.4

  reply	other threads:[~2018-02-02 18:46 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-02  7:00 [PATCH 0/6]nvme-pci: fixes on nvme_timeout and nvme_dev_disable Jianchao Wang
2018-02-02  7:00 ` [PATCH 1/6] nvme-pci: move clearing host mem behind stopping queues Jianchao Wang
2018-02-02 18:46   ` Keith Busch [this message]
2018-02-05  2:30     ` jianchao.wang
2018-02-02  7:00 ` [PATCH 2/6] nvme-pci: fix the freeze and quiesce for shutdown and reset case Jianchao Wang
2018-02-02 18:24   ` Keith Busch
2018-02-05  2:26     ` jianchao.wang
2018-02-05 15:13       ` Keith Busch
2018-02-06  1:46         ` jianchao.wang
2018-02-06 15:13           ` Keith Busch
2018-02-07  2:03             ` jianchao.wang
2018-02-07  2:13               ` jianchao.wang
2018-02-07 16:13                 ` Keith Busch
2018-02-08  1:40                   ` jianchao.wang
2018-02-08 14:17                     ` jianchao.wang
2018-02-08 15:15                       ` Keith Busch
2018-02-09  1:41                         ` jianchao.wang
2018-02-02  7:00 ` [PATCH 3/6] blk-mq: make blk_mq_rq_update_aborted_gstate a external interface Jianchao Wang
2018-02-02  7:00 ` [PATCH 4/6] nvme-pci: break up nvme_timeout and nvme_dev_disable Jianchao Wang
2018-02-02 18:31   ` Keith Busch
2018-02-05  2:22     ` jianchao.wang
2018-02-02  7:00 ` [PATCH 5/6] nvme-pci: discard wait timeout when delete cq/sq Jianchao Wang
2018-02-02  7:00 ` [PATCH 6/6] nvme-pci: suspend queues based on online_queues Jianchao Wang
  -- strict thread matches above, loose matches on Subject: below --
2018-02-02  6:54 No subject Jianchao Wang
2018-02-02  6:54 ` [PATCH 1/6] nvme-pci: move clearing host mem behind stopping queues Jianchao Wang

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=20180202184605.GJ24417@localhost.localdomain \
    --to=keith.busch@intel.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