From bad9d062a177afd5ca4b47dc8f56c64a6b7a30d4 Mon Sep 17 00:00:00 2001 From: Ben Walker Date: Mon, 11 Mar 2019 13:58:59 -0700 Subject: [PATCH] fio/nvme: Enable delay_doorbell queue pair option Since fio is continually polling for completions, this option can be safely enabled. Change-Id: I02ee3d2507d3b37f79e14d69fe90ee19c4b4eea2 Signed-off-by: Ben Walker Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447711 Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Changpeng Liu --- examples/nvme/fio_plugin/fio_plugin.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/nvme/fio_plugin/fio_plugin.c b/examples/nvme/fio_plugin/fio_plugin.c index 449ea7432..eb64d7b06 100644 --- a/examples/nvme/fio_plugin/fio_plugin.c +++ b/examples/nvme/fio_plugin/fio_plugin.c @@ -222,6 +222,7 @@ attach_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid, { struct thread_data *td = cb_ctx; struct spdk_fio_thread *fio_thread = td->io_ops_data; + struct spdk_nvme_io_qpair_opts qpopts; struct spdk_fio_ctrlr *fio_ctrlr; struct spdk_fio_qpair *fio_qpair; struct spdk_nvme_ns *ns; @@ -287,7 +288,10 @@ attach_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid, return; } - fio_qpair->qpair = spdk_nvme_ctrlr_alloc_io_qpair(fio_ctrlr->ctrlr, NULL, 0); + spdk_nvme_ctrlr_get_default_io_qpair_opts(fio_ctrlr->ctrlr, &qpopts, sizeof(qpopts)); + qpopts.delay_pcie_doorbell = true; + + fio_qpair->qpair = spdk_nvme_ctrlr_alloc_io_qpair(fio_ctrlr->ctrlr, &qpopts, sizeof(qpopts)); if (!fio_qpair->qpair) { SPDK_ERRLOG("Cannot allocate nvme io_qpair any more\n"); g_error = true;