]> git.baikalelectronics.ru Git - kernel.git/commit
nvme-pci: Remove two-pass completions
authorKeith Busch <kbusch@kernel.org>
Mon, 2 Mar 2020 16:56:53 +0000 (08:56 -0800)
committerKeith Busch <kbusch@kernel.org>
Wed, 25 Mar 2020 19:48:06 +0000 (04:48 +0900)
commit3954c88498ece4c4ae9d3e8f7c2324a715f1f70d
tree7275665bb636d064223d12bd780e2a3e6a4fdd11
parent25ee0323e3d6a8c6d77469c656eebcacbceb9e88
nvme-pci: Remove two-pass completions

Completion handling had been done in two steps: find all new completions
under a lock, then handle those completions outside the lock. This was
done to make the locked section as short as possible so that other
threads using the same lock wait less time.

The driver no longer shares locks during completion, and is in fact
lockless for interrupt driven queues, so the optimization no longer
serves its original purpose. Replace the two-pass completion queue
handler with a single pass that completes entries immediately.

Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
drivers/nvme/host/pci.c