nvme: mask CSE effects for security receive
authorKeith Busch <kbusch@kernel.org>
Fri, 27 Jan 2023 16:56:20 +0000 (08:56 -0800)
committerChristoph Hellwig <hch@lst.de>
Wed, 1 Feb 2023 15:10:10 +0000 (16:10 +0100)
commitbaff6491448b487e920faaa117e432989cbafa89
tree54f9b75642956480a7fc48a54822ccdee1ae7f46
parentcc115cbe12d932b2f081038bf32c815add2b20d7
nvme: mask CSE effects for security receive

The nvme driver will freeze the IO queues in response to an admin
command with CSE bits set. These bits notify the host that the command
that's about to be executed needs to be done exclusively, hence the
freeze.

The Security Receive command is often reported by multiple vendors with
CSE bits set. The reason for this is that the result depends on the
previous Security Send. This has nothing to do with IO queues, though,
so the driver is taking an overly cautious response to seeing this
passthrough command, while unable to fufill the intended admin queue
action.

Rather than freeze IO during this harmless command, mask off the
effects. This freezing is observed to cause IO latency spikes when host
software periodically validates the security state of the drives.

Signed-off-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Jens Axboe <axboe@kernel.dk>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/core.c