All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keith Busch <keith.busch@intel.com>
To: Jianchao Wang <jianchao.w.wang@oracle.com>
Cc: axboe@fb.com, hch@lst.de, sagi@grimberg.me, maxg@mellanox.com,
	james.smart@broadcom.com, linux-nvme@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH V5 0/2] nvme-pci: fix the timeout case when reset is ongoing
Date: Fri, 19 Jan 2018 01:01:30 -0700	[thread overview]
Message-ID: <20180119080130.GE12043@localhost.localdomain> (raw)
In-Reply-To: <1516270202-8051-1-git-send-email-jianchao.w.wang@oracle.com>

On Thu, Jan 18, 2018 at 06:10:00PM +0800, Jianchao Wang wrote:
> Hello
> 
> Please consider the following scenario.
> nvme_reset_ctrl
>   -> set state to RESETTING
>   -> queue reset_work       
>     (scheduling)
> nvme_reset_work
>   -> nvme_dev_disable
>     -> quiesce queues
>     -> nvme_cancel_request 
>        on outstanding requests
> -------------------------------_boundary_
>   -> nvme initializing (issue request on adminq)
> 
> Before the _boundary_, not only quiesce the queues, but only cancel
> all the outstanding requests.
> 
> A request could expire when the ctrl state is RESETTING.
>  - If the timeout occur before the _boundary_, the expired requests
>    are from the previous work.
>  - Otherwise, the expired requests are from the controller initializing
>    procedure, such as sending cq/sq create commands to adminq to setup
>    io queues.
> In current implementation, nvme_timeout cannot identify the _boundary_ 
> so only handles second case above.

Bare with me a moment, as I'm only just now getting a real chance to look
at this, and I'm not quite sure I follow what problem this is solving.

The nvme_dev_disable routine makes forward progress without depending on
timeout handling to complete expired commands. Once controller disabling
completes, there can't possibly be any started requests that can expire.
So we don't need nvme_timeout to do anything for requests above the
boundary.

WARNING: multiple messages have this Message-ID (diff)
From: keith.busch@intel.com (Keith Busch)
Subject: [PATCH V5 0/2] nvme-pci: fix the timeout case when reset is ongoing
Date: Fri, 19 Jan 2018 01:01:30 -0700	[thread overview]
Message-ID: <20180119080130.GE12043@localhost.localdomain> (raw)
In-Reply-To: <1516270202-8051-1-git-send-email-jianchao.w.wang@oracle.com>

On Thu, Jan 18, 2018@06:10:00PM +0800, Jianchao Wang wrote:
> Hello
> 
> Please consider the following scenario.
> nvme_reset_ctrl
>   -> set state to RESETTING
>   -> queue reset_work       
>     (scheduling)
> nvme_reset_work
>   -> nvme_dev_disable
>     -> quiesce queues
>     -> nvme_cancel_request 
>        on outstanding requests
> -------------------------------_boundary_
>   -> nvme initializing (issue request on adminq)
> 
> Before the _boundary_, not only quiesce the queues, but only cancel
> all the outstanding requests.
> 
> A request could expire when the ctrl state is RESETTING.
>  - If the timeout occur before the _boundary_, the expired requests
>    are from the previous work.
>  - Otherwise, the expired requests are from the controller initializing
>    procedure, such as sending cq/sq create commands to adminq to setup
>    io queues.
> In current implementation, nvme_timeout cannot identify the _boundary_ 
> so only handles second case above.

Bare with me a moment, as I'm only just now getting a real chance to look
at this, and I'm not quite sure I follow what problem this is solving.

The nvme_dev_disable routine makes forward progress without depending on
timeout handling to complete expired commands. Once controller disabling
completes, there can't possibly be any started requests that can expire.
So we don't need nvme_timeout to do anything for requests above the
boundary.

  parent reply	other threads:[~2018-01-19  7:58 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-18 10:10 [PATCH V5 0/2] nvme-pci: fix the timeout case when reset is ongoing Jianchao Wang
2018-01-18 10:10 ` Jianchao Wang
2018-01-18 10:10 ` [PATCH V5 1/2] nvme-pci: introduce RECONNECTING state to mark initializing procedure Jianchao Wang
2018-01-18 10:10   ` Jianchao Wang
2018-01-18 10:17   ` Max Gurtovoy
2018-01-18 10:17     ` Max Gurtovoy
2018-01-19  9:49     ` jianchao.wang
2018-01-19  9:49       ` jianchao.wang
2018-01-18 15:23   ` James Smart
2018-01-18 15:23     ` James Smart
2018-01-18 10:10 ` [PATCH V5 2/2] nvme-pci: fixup the timeout case when reset is ongoing Jianchao Wang
2018-01-18 10:10   ` Jianchao Wang
2018-01-19  4:59   ` Keith Busch
2018-01-19  4:59     ` Keith Busch
2018-01-19  5:55     ` jianchao.wang
2018-01-19  5:55       ` jianchao.wang
2018-01-19  6:05       ` Keith Busch
2018-01-19  6:05         ` Keith Busch
2018-01-19  6:53         ` jianchao.wang
2018-01-19  6:53           ` jianchao.wang
2018-01-18 15:34 ` [PATCH V5 0/2] nvme-pci: fix " James Smart
2018-01-18 15:34   ` James Smart
2018-01-19  8:01 ` Keith Busch [this message]
2018-01-19  8:01   ` Keith Busch
2018-01-19  8:14   ` jianchao.wang
2018-01-19  8:14     ` jianchao.wang
2018-01-19  8:42     ` Keith Busch
2018-01-19  8:42       ` Keith Busch
2018-01-19  9:02       ` jianchao.wang
2018-01-19  9:02         ` jianchao.wang
2018-01-19 11:52         ` Keith Busch
2018-01-19 11:52           ` Keith Busch
2018-01-19 13:56           ` jianchao.wang
2018-01-19 13:56             ` jianchao.wang
2018-01-20  2:11             ` Keith Busch
2018-01-20  2:11               ` Keith Busch
2018-01-20 14:07               ` jianchao.wang
2018-01-20 14:07                 ` jianchao.wang
2018-01-20 14:14                 ` jianchao.wang
2018-01-20 14:14                   ` 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=20180119080130.GE12043@localhost.localdomain \
    --to=keith.busch@intel.com \
    --cc=axboe@fb.com \
    --cc=hch@lst.de \
    --cc=james.smart@broadcom.com \
    --cc=jianchao.w.wang@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=maxg@mellanox.com \
    --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.