]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
NVMEDevice: Remove the unnecessary aio_wait in sync read 33597/head
authorZiye Yang <ziye.yang@intel.com>
Fri, 28 Feb 2020 17:12:57 +0000 (01:12 +0800)
committerZiye Yang <ziye.yang@intel.com>
Fri, 28 Feb 2020 17:49:57 +0000 (01:49 +0800)
Using the aio_wait are unncessary, since all the async read
submission and completion happen in the same thread.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
src/os/bluestore/NVMEDevice.cc

index 2c3987f474f85bd64f453e9e6fba9470bfce1088..b2611197d761a7bd12b78a98dfe0a8ba2bc0853d 100644 (file)
@@ -697,7 +697,7 @@ void io_complete(void *t, const struct spdk_nvme_cpl *completion)
       } else {
          task->return_code = 0;
       }
-      ctx->try_aio_wake();
+      --ctx->num_running;
     }
   } else {
     ceph_assert(task->command == IOCommand::FLUSH_COMMAND);
@@ -937,7 +937,6 @@ int NVMEDevice::read(uint64_t off, uint64_t len, bufferlist *pbl,
   make_read_tasks(this, off, ioc, buf, len, &t, off, len);
   dout(5) << __func__ << " " << off << "~" << len << dendl;
   aio_submit(ioc);
-  ioc->aio_wait();
 
   pbl->push_back(std::move(p));
   return t.return_code;
@@ -975,7 +974,6 @@ int NVMEDevice::read_random(uint64_t off, uint64_t len, char *buf, bool buffered
 
   make_read_tasks(this, aligned_off, &ioc, buf, aligned_len, &t, off, len);
   aio_submit(&ioc);
-  ioc.aio_wait();
 
   return t.return_code;
 }