nvme-pci: fix missed admin queue sq doorbell write
PATCH 1/1 nvme-pci: fix missed admin queue sq doorbell write
From: Keith Busch <[email protected]>
We can batch admin commands, which means bd->last may be false, skipping the doorbell write so that we aggregate multiple commands per write. If a subsequent command can't be dispatched for whatever reason, we have to provide the blk-mq ops' commit_rqs callback in order to ensure we properly update the doorbell.
--- drivers/nvme/host/pci.c | 1 + 1 file changed, 1 insertion(+)
drivers/nvme/host/pci.c +1 -0
@@ -2241,6 +2241,7 @@ static int nvme_create_queue(struct nvme_queue *nvmeq, int qid, bool polled)static const struct blk_mq_ops nvme_mq_admin_ops = { .queue_rq = nvme_queue_rq, .complete = nvme_pci_complete_rq, + .commit_rqs = nvme_commit_rqs, .init_hctx = nvme_admin_init_hctx, .init_request = nvme_pci_init_request, .timeout = nvme_timeout,
Signature · 1 line
2.52.0
Quoted 3 lines · Keith Busch
From: Keith Busch <[email protected]>
We can batch admin commands, which means
bd->lastmay be false,
How do we end up batching them? io_uring passthrough I guess? Can you expand the commit log a bit with that?
Otherwise looks good:
Keith Busch
maintainerQuoted 7 lines · Christoph Hellwig
Quoted 3 lines · Keith Busch
From: Keith Busch <[email protected]>
We can batch admin commands, which means
bd->lastmay be false,How do we end up batching them?
io_uringpassthrough I guess? Can you expand the commit log a bit with that?
Exactly, io_uring_cmd passthrough starts a plug. The "Fixes" tag is a bit subtle, so I'll more explicitly state this in the commit message.
Thanks.