]> www.infradead.org Git - nvme.git/commit
nvme-fabrics: use reserved tag for reg read/write command
authorChunguang Xu <chunguang.xu@shopee.com>
Fri, 31 May 2024 09:24:21 +0000 (17:24 +0800)
committerKeith Busch <kbusch@kernel.org>
Fri, 31 May 2024 20:26:15 +0000 (13:26 -0700)
commit7dc3bfcb4c9cc58970fff6aaa48172cb224d85aa
tree5e4965ed75fb8373b8c69a598e26ec8f9c63d0b8
parent29459c3eaa5c6261fbe0dea7bdeb9b48d35d862a
nvme-fabrics: use reserved tag for reg read/write command

In some scenarios, if too many commands are issued by nvme command in
the same time by user tasks, this may exhaust all tags of admin_q. If
a reset (nvme reset or IO timeout) occurs before these commands finish,
reconnect routine may fail to update nvme regs due to insufficient tags,
which will cause kernel hang forever. In order to workaround this issue,
maybe we can let reg_read32()/reg_read64()/reg_write32() use reserved
tags. This maybe safe for nvmf:

1. For the disable ctrl path,  we will not issue connect command
2. For the enable ctrl / fw activate path, since connect and reg_xx()
   are called serially.

So the reserved tags may still be enough while reg_xx() use reserved tags.

Signed-off-by: Chunguang Xu <chunguang.xu@shopee.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
drivers/nvme/host/fabrics.c