fio_plugin: Fix the performance issue on testing multiple remote nvme subsystem
The reason is that we create duplicated qpair on same subsystem many times, thus the performance is influenced. And this patch can fix this issue. Change-Id: I075b028b15e0d34857a89510710642f2d9520235 Signed-off-by: Ziye Yang <ziye.yang@intel.com> Reviewed-on: https://review.gerrithub.io/375782 Tested-by: SPDK Automated Test System <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:
parent
9e8853953a
commit
a99dd7751f
@ -74,6 +74,7 @@ struct spdk_fio_qpair {
|
||||
struct spdk_nvme_qpair *qpair;
|
||||
struct spdk_nvme_ns *ns;
|
||||
struct spdk_fio_qpair *next;
|
||||
struct spdk_fio_ctrlr *fio_ctrlr;
|
||||
};
|
||||
|
||||
struct spdk_fio_thread {
|
||||
@ -156,7 +157,9 @@ attach_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid,
|
||||
|
||||
fio_qpair = fio_thread->fio_qpair;
|
||||
while (fio_qpair != NULL) {
|
||||
if (fio_qpair->f == f) {
|
||||
if ((fio_qpair->f == f) ||
|
||||
((spdk_nvme_transport_id_compare(trid, &fio_qpair->fio_ctrlr->tr_id) == 0) &&
|
||||
(spdk_nvme_ns_get_id(fio_qpair->ns) == ns_id))) {
|
||||
return;
|
||||
}
|
||||
fio_qpair = fio_qpair->next;
|
||||
@ -171,6 +174,7 @@ attach_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid,
|
||||
fio_qpair->qpair = spdk_nvme_ctrlr_alloc_io_qpair(fio_ctrlr->ctrlr, NULL, 0);
|
||||
fio_qpair->ns = ns;
|
||||
fio_qpair->f = f;
|
||||
fio_qpair->fio_ctrlr = fio_ctrlr;
|
||||
fio_qpair->next = fio_thread->fio_qpair;
|
||||
fio_thread->fio_qpair = fio_qpair;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user