From: ming.lei@redhat.com (Ming Lei)
Subject: [RFC PATCH] nvme of: don't flush scan work inside reset context
Date: Wed, 7 Nov 2018 11:51:08 +0800 [thread overview]
Message-ID: <20181107035107.GA6920@ming.t460p> (raw)
In-Reply-To: <97aae455-fa74-b1aa-21f6-80c03732a573@grimberg.me>
On Tue, Nov 06, 2018@07:26:28PM -0800, Sagi Grimberg wrote:
> Ming,
>
> > When scan work is in-progress, any controller error may trigger
> > reset, now fc, rdma and loop host tries to flush scan work
> > inside reset context.
> >
> > This way can cause deadlock easily because any IO during controler
> > recovery(reset) can't be completed until the recovery is done.
>
> Did you encounter this deadlock? or is it theoretical?
There are several such reports in Red Hat Bugzilla.
>
> The point of nvme_stop_ctrl is to quiesce everything before
> moving forward with tearing down the controller instead of
> trying to handle concurrent incoming I/O.
>
> I'm not sure I understand why you say that I/O can only be
> completed when the reset is done? if the transport entered
Please see nvme_rdma_teardown_io_queues(), in which each in-flight
request is canceled via nvme_cancel_request(), which just calls
nvme_complete_rq() to requeue request(normal IO) to blk-mq sw queue
or scheduler queue.
During reset, block request queues are quiesced, so the requeued
requests can't be dispatched to nvme driver until reset is done.
That is why all normal I/O can only be completed after reset is done.
> a failed state either the inflight I/O is drain or one of
> the scan work I/O operations times out.
Timeout only works for in-flight request, as mentioned above,
all these requests are canceled and put back into blk-mq sw queue
or scheduler queue during reset, so timeout handler can't cover
them at all.
Thanks,
Ming
next prev parent reply other threads:[~2018-11-07 3:51 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-05 11:57 [RFC PATCH] nvme of: don't flush scan work inside reset context Ming Lei
2018-11-05 16:28 ` Keith Busch
2018-11-06 0:30 ` Ming Lei
2018-11-05 20:04 ` James Smart
2018-11-06 1:18 ` Ming Lei
2018-11-06 5:45 ` James Smart
2018-11-07 1:58 ` Ming Lei
2018-11-08 0:19 ` Sagi Grimberg
2018-11-08 17:49 ` James Smart
2018-11-07 3:26 ` Sagi Grimberg
2018-11-07 3:51 ` Ming Lei [this message]
2018-11-07 4:38 ` Sagi Grimberg
2018-11-07 8:34 ` Ming Lei
2018-11-07 18:38 ` Sagi Grimberg
2018-11-07 19:27 ` James Smart
2018-11-08 0:05 ` Ming Lei
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=20181107035107.GA6920@ming.t460p \
--to=ming.lei@redhat.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;
as well as URLs for NNTP newsgroup(s).