From: sagi@grimberg.me (Sagi Grimberg)
Subject: [RFC PATCH] nvme of: don't flush scan work inside reset context
Date: Wed, 7 Nov 2018 16:19:06 -0800 [thread overview]
Message-ID: <1590d7a5-8fe7-c775-6656-36e117b8a8db@grimberg.me> (raw)
In-Reply-To: <dbfed2f9-4ad3-40ce-7c6d-0feae2b4128f@broadcom.com>
>>> transports are
>>> several of the flush cases require an io to complete to finish
>>> flushing -
>>> not just scan_work.?? nvme_mpath_stop() syncs with ctrl->ana_work,
>>> which may
>>> be waiting for an ana log to complete.? fw_act_queues() may be in the
>>> midst
>>> of polling the CSTS bit register or doing a fw_slot log read, or a
>>> stop_ctrl() routine for the transport may be in the middle of a
>>> start_ctrl
>>> call.
>> These commands won't be retried since REQ_FAILFAST_DRIVER is set for any
>> request allocated via nvme_alloc_request().
>>
>> So the above flush cases you mentioned should be easier to handle than
>> IO from
>> scan context. However, looks the patch we discussed before by moving
>> nvme_stop_ctrl() after nvme_rdma_shutdown_ctrl() is still needed for
>> avoiding hang on flush in these commands.
>
> Agree - nvme_stop_ctrl() has to move so the transport routines that
> stop/return the io can run.? Leaving it in the same place with an
> argument won't be enough.
nvme_stop_ctrl() cannot move to after queue termination, it has to
barrier before moving forward. The things that must flush before
are async_event_work that does not go via the normal request path
that is quiesced and ->stop_ctrl() at least for the rdma case make
sure that no error recovery is concurrent with the reset/delete flow.
Perhaps we can move scan_work flush into nvme_remove_namespaces()
instead? I guess it makes sense that when we remove namespaces we don't
want a scan to run concurrently?
next prev parent reply other threads:[~2018-11-08 0:19 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 [this message]
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
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=1590d7a5-8fe7-c775-6656-36e117b8a8db@grimberg.me \
--to=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).