From: Sagi Grimberg <sagi@grimberg.me>
To: Christoph Hellwig <hch@lst.de>, Rakesh Pandit <rakesh@tuxera.com>
Cc: linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org,
Keith Busch <keith.busch@intel.com>, Jens Axboe <axboe@fb.com>
Subject: Re: [PATCH V3] nvme: fix multiple ctrl removal scheduling
Date: Tue, 30 May 2017 13:09:02 +0300 [thread overview]
Message-ID: <b91063aa-05a3-2fd2-8366-58eadbbdc643@grimberg.me> (raw)
In-Reply-To: <20170528094043.GA14199@lst.de>
> Hi Rkesh,
>
> this looks reasonable, but we'll need to also adopt the non-PCI
> driver to the new state machine. I can give this a spin.
>
> At that point we probably want to move nvme_reset into common
> code somehow.
Hi Guys, sorry for barging in late, I've been way too busy with
internal stuff lately...
I think that adding a new state should (a) be added with careful
understanding that its absolutely needed and (b) does not complicate
the state machine.
I honestly think that adding a new state that says "we scheduled a
reset" to address a synchronization issue is not what we should do.
1. I think that state NVME_CTRL_RESETTING semantically means that
the reset flow has been scheduled and the state transition atomicity
suffices for synchronization. So nvme_reset should change the state
and if it succeeded, schedule the reset_work instead of changing the
state inside reset_work (like we do in fabrics). At this point we should
lose the WARN_ON.
2. I personally think that nvme_probe shouldn't necessarily trigger
controller reset, if we can split reset to a couple of useful routines
we can reuse them in nvme_probe. The reason is that for reset we need
to address various conditions (errors, ongoing traffic etc...) that
are not relevant at all for probe. Not sure if anyone agrees with me
on this one.
I started to experiment with trying to move some of this to nvme core[1]
(rdma and loop) but has yet to fully convert pci which is a bit more
complicated.
[1] git://git.infradead.org/users/sagi/linux.git
nvme-central-reset-delete-err
prev parent reply other threads:[~2017-05-30 10:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-26 20:13 Rakesh Pandit
2017-05-28 9:40 ` Christoph Hellwig
2017-05-28 11:47 ` Rakesh Pandit
2017-05-30 10:09 ` Sagi Grimberg [this message]
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=b91063aa-05a3-2fd2-8366-58eadbbdc643@grimberg.me \
--to=sagi@grimberg.me \
--cc=axboe@fb.com \
--cc=hch@lst.de \
--cc=keith.busch@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=rakesh@tuxera.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
all inboxes | Powered by JetHome®