linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* subsystem reset question (RE: [RFC PATCH 0/5] to add more nvme reset functions)
@ 2019-12-13  1:22 tsutomu.owa
  2019-12-13 16:17 ` Keith Busch
  0 siblings, 1 reply; 2+ messages in thread
From: tsutomu.owa @ 2019-12-13  1:22 UTC (permalink / raw)
  To: kbusch; +Cc: hch, tsutomu.owa, sagi, linux-nvme

Hi Keith-san,

thanks a lot for your reply.

BTW, I have a question regarding subsystem reset which is almost identical with the following post.
http://lists.infradead.org/pipermail/linux-nvme/2016-October/006609.html

I've tested 4.19.87 and 5.4.1 kernel with a few nvme devices and got the same result;
the device disappears after subsystem-reset.  It requires nvme remove and rescan via sysfs to recover.

I suppose that this is an expected behavior since the result looks same, but would like to
make sure that it is.

===
[guest@localhost ~]$ uname -r
4.19.87
[guest@localhost ~]$ nvme --version
nvme version 1.8.1
[guest@localhost ~]$ ls /dev/nvme*
/dev/nvme0  /dev/nvme0n1
[guest@localhost ~]$ sudo nvme id-ctrl /dev/nvme0 |egrep "^mn |^fr "
mn        : INTEL SSDPEKNW020T8
fr        : 002C
[guest@localhost ~]$ date; sudo dd if=/dev/nvme0n1 of=/dev/null bs=4096 count=1; date
Fri Dec 13 10:16:01 JST 2019
1+0 records in
1+0 records out
4096 bytes (4.1 kB) copied, 0.000172932 s, 23.7 MB/s
Fri Dec 13 10:16:01 JST 2019
[guest@localhost ~]$
[guest@localhost ~]$ date; sudo nvme subsystem-reset /dev/nvme0; date
Fri Dec 13 10:16:10 JST 2019
Fri Dec 13 10:16:10 JST 2019
[guest@localhost ~]$
[guest@localhost ~]$ ls /dev/nvme*
/dev/nvme0  /dev/nvme0n1
[guest@localhost ~]$ date; sudo dd if=/dev/nvme0n1 of=/dev/null bs=4096 count=1; date
Fri Dec 13 10:16:28 JST 2019
dd: error reading '/dev/nvme0n1': Input/output error
0+0 records in
0+0 records out
0 bytes (0 B) copied, 32.0633 s, 0.0 kB/s
Fri Dec 13 10:17:00 JST 2019
[guest@localhost ~]$
[guest@localhost ~]$ ls /dev/nvme*
ls: cannot access /dev/nvme*: No such file or directory
[guest@localhost ~]$
[guest@localhost ~]$ sudo sh -c 'echo 1 > /sys/bus/pci/devices/0000\:01\:00.0/remove'
[guest@localhost ~]$ sudo sh -c 'echo 1 > /sys/bus/pci/rescan'
[guest@localhost ~]$
[guest@localhost ~]$ ls /dev/nvme*
/dev/nvme0  /dev/nvme0n1
[guest@localhost ~]$
===

thank you.
-- owa


_______________________________________________
linux-nvme mailing list
linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: subsystem reset question (RE: [RFC PATCH 0/5] to add more nvme reset functions)
  2019-12-13  1:22 subsystem reset question (RE: [RFC PATCH 0/5] to add more nvme reset functions) tsutomu.owa
@ 2019-12-13 16:17 ` Keith Busch
  0 siblings, 0 replies; 2+ messages in thread
From: Keith Busch @ 2019-12-13 16:17 UTC (permalink / raw)
  To: tsutomu.owa; +Cc: Keith Busch, Christoph Hellwig, Sagi Grimberg, linux-nvme

On Thu, Dec 12, 2019 at 6:22 PM <tsutomu.owa@kioxia.com> wrote:
> BTW, I have a question regarding subsystem reset which is almost identical with the following post.
> http://lists.infradead.org/pipermail/linux-nvme/2016-October/006609.html
>
> I've tested 4.19.87 and 5.4.1 kernel with a few nvme devices and got the same result;
> the device disappears after subsystem-reset.  It requires nvme remove and rescan via sysfs to recover.
>
> I suppose that this is an expected behavior since the result looks same, but would like to
> make sure that it is.

NVM Subsystem Reset has the device disable it's link, so the affected
slot needs hotplug support in order to react to the surprise link down
and subsequent link active.

It's possible we could do something smarter for the controller path that
the driver received the NSSR request, but that doesn't really help for
other paths in the same subsystem, which may be connected to different
hosts.

_______________________________________________
linux-nvme mailing list
linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-12-13 22:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-13  1:22 subsystem reset question (RE: [RFC PATCH 0/5] to add more nvme reset functions) tsutomu.owa
2019-12-13 16:17 ` Keith Busch

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).