All of lore.kernel.org
 help / color / mirror / Atom feed
* nvme: nvme-tcp shutdown when remote is unreachable
@ 2021-08-31 13:43 Belanger, Martin
  0 siblings, 0 replies; only message in thread
From: Belanger, Martin @ 2021-08-31 13:43 UTC (permalink / raw)
  To: linux-nvme

Hello linux-nvme community,

I ran into a 1 minute deadlock trying to disconnect from a remote (tcp) controller while the network was down. In this particular case, the network has been down for a period of time shorter than the kato. So, the kernel module has not yet detected that the network is down.

After further investigations, I found that during a disconnect we try to clear the NVME_CC_ENABLE bit - see function nvme_disable_ctrl() in host/core.c. However, since the network is down, this operation blocks until the 1 minute timeout (default) expires. Therefore, the disconnect operation blocks for 1 minute.

Interestingly, nvme_disable_ctrl() defines a 5 sec timeout for reading the status (NVME_REG_CSTS) from the controller. So we have a 1 minute timeout for writing to the controller, but only a 5 sec timeout for reading from the controller.

My question is: On a disconnect shouldn't we use timeout shorter than the default 1 minute when writing to the controller? At the very least, shouldn't the timeout for writing to the controller be the same (5 sec) as the timeout for reading from the controller?

Thanks,
Martin Belanger
Engineering Technologist, Dell Inc.

Internal Use - Confidential

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-31 13:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-31 13:43 nvme: nvme-tcp shutdown when remote is unreachable Belanger, Martin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.