All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Sagi Grimberg <sagi@grimberg.me>
Cc: Keith Busch <kbusch@kernel.org>, Christoph Hellwig <hch@lst.de>,
	linux-nvme@lists.infradead.org,
	James Smart <james.smart@broadcom.com>
Subject: Re: [PATCH v3 2/9] nvme-fabrics: allow to queue requests for live queues
Date: Thu, 20 Aug 2020 08:09:41 +0200	[thread overview]
Message-ID: <20200820060941.GB6188@lst.de> (raw)
In-Reply-To: <20200820053651.197057-3-sagi@grimberg.me>

On Wed, Aug 19, 2020 at 10:36:44PM -0700, Sagi Grimberg wrote:
> Right now we are failing requests based on the controller state (which
> is checked inline in nvmf_check_ready) however we should definitely
> accept requests if the queue is live.
> 
> When entering controller reset, we transition the controller into
> NVME_CTRL_RESETTING, and then return BLK_STS_RESOURCE for non-mpath
> requests (have blk_noretry_request set).
> 
> This is also the case for NVME_REQ_USER for the wrong reason. There
> shouldn't be any reason for us to reject this I/O in a controller reset.
> We do want to prevent passthru commands on the admin queue because we
> need the controller to fully initialize first before we let user passthru
> admin commands to be issued.
> 
> In a non-mpath setup, this means that the requests will simply be
> requeued over and over forever not allowing the q_usage_counter to drop
> its final reference, causing controller reset to hang if running
> concurrently with heavy I/O.

I'm still rather bothered with the admin queue exception.  And given that
the q_usage_counter problem should only really be an issue for file system
requests, as passthrough requests do not automatically get retried why
can't we just reject all user command to be symetric and straight forward?
The callers in userspace need to be able to cope with retryable errors
anyway.

>  	/*
> +	 * currently we have a problem sending passthru commands
> +	 * on the admin_q if the controller is not LIVE because we can't
> +	 * make sure that they are going out after the admin connect,
> +	 * controller enable and/or other commands in the initialization
> +	 * sequence. until the controller will be LIVE, fail with
> +	 * BLK_STS_RESOURCE so that they will be rescheduled.
>  	 */

Nit: please start multi-line comments with a capital letter.  Also I
think some of the lines do not nearly use up the 80 characters available.

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

  reply	other threads:[~2020-08-20  6:09 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-20  5:36 [PATCH v3 0/9] fix possible controller reset hangs in nvme-tcp/nvme-rdma Sagi Grimberg
2020-08-20  5:36 ` [PATCH v3 1/9] nvme-fabrics: don't check state NVME_CTRL_NEW for request acceptance Sagi Grimberg
2020-08-20  6:02   ` Christoph Hellwig
2020-08-20 20:49   ` James Smart
2020-08-20  5:36 ` [PATCH v3 2/9] nvme-fabrics: allow to queue requests for live queues Sagi Grimberg
2020-08-20  6:09   ` Christoph Hellwig [this message]
2020-08-20 16:58     ` Sagi Grimberg
2020-08-20 20:45       ` James Smart
2020-08-20 22:13         ` Sagi Grimberg
2020-08-20 22:17           ` James Smart
2020-08-21  6:22         ` Christoph Hellwig
2020-08-21 15:22           ` James Smart
2020-08-21 19:44           ` Sagi Grimberg
2020-08-23 15:19             ` James Smart
2020-08-24  8:06               ` Sagi Grimberg
2020-08-24  8:02           ` Sagi Grimberg
2020-08-25  7:13             ` Christoph Hellwig
2020-08-25 15:00               ` Sagi Grimberg
2020-08-25 15:41                 ` James Smart
2020-08-25 17:35                   ` Sagi Grimberg
2020-09-04 20:26                     ` Sagi Grimberg
2020-09-08  9:05                       ` Christoph Hellwig
2020-09-08 16:47                         ` Sagi Grimberg
2020-09-08 16:48                           ` Christoph Hellwig
2020-09-08 19:56                             ` Sagi Grimberg
2020-08-20 20:54   ` James Smart
2020-08-20 20:56   ` James Smart
2020-08-20  5:36 ` [PATCH v3 3/9] nvme: have nvme_wait_freeze_timeout return if it timed out Sagi Grimberg
2020-08-20  6:09   ` Christoph Hellwig
2020-08-20  5:36 ` [PATCH v3 4/9] nvme-tcp: serialize controller teardown sequences Sagi Grimberg
2020-08-20  5:36 ` [PATCH v3 5/9] nvme-tcp: fix timeout handler Sagi Grimberg
2020-08-20  5:36 ` [PATCH v3 6/9] nvme-tcp: fix reset hang if controller died in the middle of a reset Sagi Grimberg
2020-08-20  5:36 ` [PATCH v3 7/9] nvme-rdma: serialize controller teardown sequences Sagi Grimberg
2020-08-20 21:04   ` James Smart
2020-08-20 22:16     ` Sagi Grimberg
2020-08-21 21:08   ` James Smart
2020-08-20  5:36 ` [PATCH v3 8/9] nvme-rdma: fix timeout handler Sagi Grimberg
2020-08-20  6:10   ` Christoph Hellwig
2020-08-20 21:37   ` James Smart
2020-08-20  5:36 ` [PATCH v3 9/9] nvme-rdma: fix reset hang if controller died in the middle of a reset Sagi Grimberg
2020-08-20  6:10   ` Christoph Hellwig
2020-08-24 18:29 ` [PATCH v3 0/9] fix possible controller reset hangs in nvme-tcp/nvme-rdma Sagi Grimberg
2020-08-25  7:16   ` Christoph Hellwig
2020-08-25 15:35     ` James Smart

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=20200820060941.GB6188@lst.de \
    --to=hch@lst.de \
    --cc=james.smart@broadcom.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.