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 16:34:20 +0800 [thread overview]
Message-ID: <20181107083412.GA8878@ming.t460p> (raw)
In-Reply-To: <f1167108-0e3f-0b64-d9c3-399f4dec73d3@grimberg.me>
On Tue, Nov 06, 2018@08:38:59PM -0800, Sagi Grimberg wrote:
>
> > > Did you encounter this deadlock? or is it theoretical?
> >
> > There are several such reports in Red Hat Bugzilla.
>
> Is there any way to see the reports? I'm looking for the
> scenario because error recovery does not usually go through
> the reset flow.
https://bugzilla.redhat.com/show_bug.cgi?id=1622487
https://bugzilla.redhat.com/show_bug.cgi?id=1628100
Especially you may find some details in the following comment:
https://bugzilla.redhat.com/show_bug.cgi?id=1628100#c7
>
> > > 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.
>
> I'm pretty familiar with what nvme_rdma_teardown_io_queues() is
> doing.
>
> > During reset, block request queues are quiesced, so the requeued
> > requests can't be dispatched to nvme driver until reset is done.
>
> That's fine, they have no reason to be dispatched until the reset
> is done, it has no chance to complete.
>
> > That is why all normal I/O can only be completed after reset is done.
>
> I'm still not getting your point, resets should be able to complete without
> pending I/Os to complete with a failed status.
> That is why I want to see the tickets details, I want to understand
> what is the issue that this solves.
Once controller's state is updated to RESETTING, no new FS IO can
be queued to hardware any more, and these IOs are handled as
BLK_STS_RESOURCE, then scan work function may not move on because
of request exhaustion or writeback throttle.
Then flush_work(&ctrl->scan_work) inside reset work function hangs forever.
>
> > > 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.
>
> Its not supposed to. This patch says it specifically addresses the scan
> work.
>
> I think you need to explain your patch better to get across exactly
> what it is fixing.
There may not be any in-flight requests in this case, so timeout handler
can't cover this case.
Thanks,
Ming
next prev parent reply other threads:[~2018-11-07 8:34 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
2018-11-07 4:38 ` Sagi Grimberg
2018-11-07 8:34 ` Ming Lei [this message]
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=20181107083412.GA8878@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).