nvme: remove NVME_IO_TRACKERS to use hardware and user specified size

Change-Id: Ie6946343314a62e4416d8cd7dadd98c20a1c1e3a
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/361700
Tested-by: <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
GangCao 2017-05-18 20:40:38 -04:00 committed by Jim Harris
parent 7b5a229c5f
commit afbb5ceec2

View File

@ -46,14 +46,11 @@
/* /*
* NVME_IO_ENTRIES defines the size of an I/O qpair's submission and completion * NVME_IO_ENTRIES defines the size of an I/O qpair's submission and completion
* queues, while NVME_IO_TRACKERS defines the maximum number of I/O that we * queues, this value will be used to negotiate with user specified size and
* will allow outstanding on an I/O qpair at any time. The only advantage in * hardware allowed size to determine the maximum number of outstanding IOs on
* having IO_ENTRIES > IO_TRACKERS is for debugging purposes - when dumping * an I/O qpair at any time.
* the contents of the submission and completion queues, it will show a longer
* history of data.
*/ */
#define NVME_IO_ENTRIES (256) #define NVME_IO_ENTRIES (512)
#define NVME_IO_TRACKERS (128)
/* /*
* NVME_MAX_SGL_DESCRIPTORS defines the maximum number of descriptors in one SGL * NVME_MAX_SGL_DESCRIPTORS defines the maximum number of descriptors in one SGL
@ -843,11 +840,10 @@ nvme_pcie_qpair_construct(struct spdk_nvme_qpair *qpair)
num_trackers = NVME_ADMIN_TRACKERS; num_trackers = NVME_ADMIN_TRACKERS;
} else { } else {
/* /*
* No need to have more trackers than entries in the submit queue. * Note that for a queue size of N, we can only have (N-1)
* Note also that for a queue size of N, we can only have (N-1)
* commands outstanding, hence the "-1" here. * commands outstanding, hence the "-1" here.
*/ */
num_trackers = spdk_min(NVME_IO_TRACKERS, pqpair->num_entries - 1); num_trackers = pqpair->num_entries - 1;
} }
assert(num_trackers != 0); assert(num_trackers != 0);