]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
bluestore, NVMEDEVICE: Specify the max io completion in conf
authoroptimistyzy <optimistyzy@gmail.com>
Mon, 6 Mar 2017 04:55:41 +0000 (12:55 +0800)
committeroptimistyzy <optimistyzy@gmail.com>
Mon, 6 Mar 2017 06:25:07 +0000 (14:25 +0800)
I do not think that 4 is meaninful. If a value needs to be determined,
it should be configured in the configuration file.

Signed-off-by: optimistyzy <optimistyzy@gmail.com>
src/common/config_opts.h
src/os/bluestore/NVMEDevice.cc

index 5f01d3f2d01cfc086d471cf393b4c329cfd2b50e..876f54e1eba616893a05840876704fbc7e6bf387 100644 (file)
@@ -1030,6 +1030,9 @@ OPTION(bluestore_bluefs_reclaim_ratio, OPT_FLOAT, .20) // how much to reclaim at
 OPTION(bluestore_spdk_socket_mem, OPT_STR, "512,512")
 // A hexadecimal bit mask of the cores to run on. Note the core numbering can change between platforms and should be determined beforehand.
 OPTION(bluestore_spdk_coremask, OPT_STR, "0x3")
+// Specify the maximal I/Os to be batched completed while checking queue pair completions.
+// Default value 0 means that let SPDK nvme library determine the value.
+OPTION(bluestore_spdk_max_io_completion, OPT_U32, 0)
 OPTION(bluestore_block_path, OPT_STR, "")
 OPTION(bluestore_block_size, OPT_U64, 10 * 1024*1024*1024)  // 10gb for testing
 OPTION(bluestore_block_create, OPT_BOOL, true)
index 60ee5fb9b54208be9db611f01836db8e72ee44df..c7cdb38afa4ad12d054a0ba023dd57b180c27ff4 100644 (file)
@@ -384,7 +384,6 @@ void SharedDriverData::_aio_thread()
 
   Task *t = nullptr;
   int r = 0;
-  const int max = 4;
   uint64_t lba_off, lba_count;
   ceph::coarse_real_clock::time_point cur, start
     = ceph::coarse_real_clock::now();
@@ -393,7 +392,7 @@ void SharedDriverData::_aio_thread()
  again:
     dout(40) << __func__ << " polling" << dendl;
     if (inflight) {
-      if (!spdk_nvme_qpair_process_completions(qpair, max)) {
+      if (!spdk_nvme_qpair_process_completions(qpair, g_conf->bluestore_spdk_max_io_completion)) {
         dout(30) << __func__ << " idle, have a pause" << dendl;
         _mm_pause();
       }