]> 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)
commitc7aecb936362713a3992ac32cf20cc82b627ded6
tree7275665bb636d064223d12bd780e2a3e6a4fdd11
parent7877214445d98ee3ad4f2271e4ca5419f84f7e2e
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