nvme: default use_cmb_sqs to false

Using the CMB for SQs is not a standard use case.
Performance can vary widely when using CMB for SQs
and is typically not the configuration used for
benchmarking.

So let's change the default value here to 'false',
users can still opt-in by setting this option to
true in the spdk_nvme_ctrlr_opts structure prior
to attach.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Iab746ba777b04152ffb92fea2a2bb923a0a0bf21
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8227
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Jim Harris 2021-06-09 17:12:43 +00:00
parent a01ad578a8
commit 815ce363a9
3 changed files with 8 additions and 3 deletions

View File

@ -49,6 +49,11 @@ Added a new function `spdk_nvme_ns_cmd_copy` to submit a Simple Copy Command to
Update the spdk_nvme_generic_command_status_code structure with new status code
according to the definition in nvme 1.4 spec.
spdk_nvme_ctrlr_get_default_ctrlr_opts now sets use_cmb_sqs to false. This means
that is a controller has a CMB and supports SQs in the CMB, SPDK will not use
the CMB for SQs by default - the user must set use_cmb_sqs to true in
the spdk_nvme_ctrlr_opts structure prior to controller attach.
### rpc
New RPC `bdev_rbd_register_cluster` and `bdev_rbd_unregister_cluster` was added, it allows to create

View File

@ -158,7 +158,7 @@ spdk_nvme_ctrlr_get_default_ctrlr_opts(struct spdk_nvme_ctrlr_opts *opts, size_t
} \
SET_FIELD(num_io_queues, DEFAULT_MAX_IO_QUEUES);
SET_FIELD(use_cmb_sqs, true);
SET_FIELD(use_cmb_sqs, false);
SET_FIELD(no_shn_notification, false);
SET_FIELD(arb_mechanism, SPDK_NVME_CC_AMS_RR);
SET_FIELD(arbitration_burst, 0);

View File

@ -1785,7 +1785,7 @@ test_ctrlr_get_default_ctrlr_opts(void)
CU_ASSERT(sizeof(opts) > 8);
spdk_nvme_ctrlr_get_default_ctrlr_opts(&opts, 8);
CU_ASSERT_EQUAL(opts.num_io_queues, DEFAULT_MAX_IO_QUEUES);
CU_ASSERT_TRUE(opts.use_cmb_sqs);
CU_ASSERT_FALSE(opts.use_cmb_sqs);
/* check below fields are not initialized by default value */
CU_ASSERT_EQUAL(opts.arb_mechanism, 0);
CU_ASSERT_EQUAL(opts.keep_alive_timeout_ms, 0);
@ -1805,7 +1805,7 @@ test_ctrlr_get_default_ctrlr_opts(void)
/* set a consistent opts_size */
spdk_nvme_ctrlr_get_default_ctrlr_opts(&opts, sizeof(opts));
CU_ASSERT_EQUAL(opts.num_io_queues, DEFAULT_MAX_IO_QUEUES);
CU_ASSERT_TRUE(opts.use_cmb_sqs);
CU_ASSERT_FALSE(opts.use_cmb_sqs);
CU_ASSERT_EQUAL(opts.arb_mechanism, SPDK_NVME_CC_AMS_RR);
CU_ASSERT_EQUAL(opts.keep_alive_timeout_ms, 10 * 1000);
CU_ASSERT_EQUAL(opts.io_queue_size, DEFAULT_IO_QUEUE_SIZE);