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)
commit324b494c286298d51bc5ed5107644ebe23f9dad6
tree7275665bb636d064223d12bd780e2a3e6a4fdd11
parentbf392a5dc02a9b796f3da89fc5bb42856aca64cb
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