Skip to content

drivers/nvme: deepen the IO queue and PRP-list cache for concurrent load - #1479

Open
gburd wants to merge 1 commit into
cloudius-systems:masterfrom
gburd:pr/nvme-queue-depth
Open

drivers/nvme: deepen the IO queue and PRP-list cache for concurrent load#1479
gburd wants to merge 1 commit into
cloudius-systems:masterfrom
gburd:pr/nvme-queue-depth

Conversation

@gburd

@gburd gburd commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Problem

The NVMe driver created IO submission queues 64 entries deep and pre-allocated
only 16 PRP-list pages per queue. Under a concurrent workload that keeps many
I/Os in flight, a 64-deep queue fills quickly and submitting threads then block
on the sq-full wait, limiting how much I/O can be outstanding at once.

Fix

Deepen the IO queue to 256 entries. This stays clamped to the device's
advertised maximum (cap.mqes) in create_io_queues(), so it is safe on
controllers with a smaller queue-entry limit and simply uses more of the depth
the device already offers. Grow the per-queue PRP-list cache from 16 to 128 to
match, so a deep busy queue rarely misses into alloc_page() on the submit
path; a miss still falls back to allocation and a full pool frees on return, so
this is a churn optimization rather than a correctness change.

Testing

Built and booted; NVMe I/O continues to work with the deeper queue. The change
is conservative (bounded by the device's own cap.mqes) and touches only queue
sizing.

Under a concurrent database workload on native NVMe the IO submission queue
(depth 64) filled quickly, so submitting threads blocked on the sq-full wait
and I/O serialized -- throughput stayed flat and latency grew with concurrency
while the CPUs sat idle waiting for completions. Deepen the IO queue to 256
entries (still clamped to the device's advertised cap.mqes in
create_io_queues, so it is safe on controllers with a smaller limit) so many
more requests stay in flight concurrently. Grow the per-queue PRP-list cache
from 16 to 128 to match, avoiding alloc_page churn on the submit path of a deep
busy queue (a miss still falls back to alloc and a full pool frees on return,
so this is a churn optimization, not a correctness change).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant