Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion drivers/nvme-queue.hh
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,11 @@ protected:
static constexpr size_t max_pending_levels = 4;

// Let us hold to allocated PRP pages but also limit to up 16 ones
ring_spsc<u64*, unsigned, 16> _free_prp_lists;
// Cache of pre-allocated PRP-list pages for multi-page I/Os. Sized to the
// IO queue depth class so a deep, busy queue rarely misses into alloc_page()
// on the submit path; a miss still falls back to alloc and a full pool frees
// on return, so this is a churn optimization, not a correctness limit.
ring_spsc<u64*, unsigned, 128> _free_prp_lists;

mutex _lock;
};
Expand Down
9 changes: 8 additions & 1 deletion drivers/nvme.hh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,14 @@
#define NVME_ADMIN_QUEUE_SIZE 8

//Will be lower if the device doesnt support the specified queue size
#define NVME_IO_QUEUE_SIZE 64
// A deeper IO queue lets many I/Os stay in flight concurrently instead of
// blocking submitters on a full submission queue. Under a concurrent database
// workload on real (native NVMe) hardware the old depth of 64 filled quickly,
// serializing threads on the sq-full wait; 256 keeps more requests in flight
// without materially more memory. The device's advertised max (cap.mqes) still
// clamps this in create_io_queues(), so it is safe on controllers with a
// smaller queue-entry limit.
#define NVME_IO_QUEUE_SIZE 256

namespace nvme {

Expand Down