linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Michael Kropaczek <Michael.Kropaczek@solidigm.com>
To: Keith Busch <kbusch@kernel.org>
Cc: "linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>,
	Jens Axboe <axboe@fb.com>, Christoph Hellwig <hch@lst.de>,
	Sagi Grimberg <sagi@grimberg.me>
Subject: RE: [PATCH v3 0/1] nvme: Fix problem when booting from NVMe drive was leading to a hang.
Date: Tue, 12 Mar 2024 15:17:21 +0000	[thread overview]
Message-ID: <PH0PR10MB541950146350B7B4D863CF8F922B2@PH0PR10MB5419.namprd10.prod.outlook.com> (raw)
In-Reply-To: <ZfBpAw_4e-xfAHW8@kbusch-mbp.mynextlight.net>

Thank you, Keith,

Understood,

  Michael 

-----Original Message-----
From: Keith Busch <kbusch@kernel.org> 
Sent: Tuesday, March 12, 2024 7:39 AM
To: Michael Kropaczek <Michael.Kropaczek@solidigm.com>
Cc: linux-nvme@lists.infradead.org; Jens Axboe <axboe@fb.com>; Christoph Hellwig <hch@lst.de>; Sagi Grimberg <sagi@grimberg.me>
Subject: Re: [PATCH v3 0/1] nvme: Fix problem when booting from NVMe drive was leading to a hang.

Caution: External Email


On Mon, Mar 11, 2024 at 03:08:11PM -0700, Michael Kropaczek wrote:
> diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index 
> e6267a6aa380..bda7cf5ff674 100644
> --- a/drivers/nvme/host/pci.c
> +++ b/drivers/nvme/host/pci.c
> @@ -2593,6 +2593,9 @@ static void nvme_dev_disable(struct nvme_dev *dev, bool shutdown)
>                       nvme_wait_freeze_timeout(&dev->ctrl, NVME_IO_TIMEOUT);
>       }
>
> +     if (shutdown && dev->hmb)
> +             nvme_set_host_mem(dev, 0);
> +

As I said last time, this deadlocks if the controller doesn't respond to the command. While that shouldn't happen with a properly functioning controller, we can't count on that to prevent a deadlock.

>       nvme_quiesce_io_queues(&dev->ctrl);
>
>       if (!dead && dev->ctrl.queue_count > 0) {
> --


      reply	other threads:[~2024-03-12 15:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-11 22:08 [PATCH v3 0/1] nvme: Fix problem when booting from NVMe drive was leading to a hang Michael Kropaczek
2024-03-12 14:38 ` Keith Busch
2024-03-12 15:17   ` Michael Kropaczek [this message]

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=PH0PR10MB541950146350B7B4D863CF8F922B2@PH0PR10MB5419.namprd10.prod.outlook.com \
    --to=michael.kropaczek@solidigm.com \
    --cc=axboe@fb.com \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --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).