]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: release deferred throttle on io finish, before cleanup
authorSage Weil <sage@redhat.com>
Wed, 8 Mar 2017 19:57:52 +0000 (14:57 -0500)
committerSage Weil <sage@redhat.com>
Tue, 21 Mar 2017 18:56:27 +0000 (13:56 -0500)
The throttle is really about limiting deferred IO; we do not need to
actually remove the deferred record from the kv db before queueing more.
(In fact, the txc that queues more will do the cleanup.)

Signed-off-by: Sage Weil <sage@redhat.com>
src/os/bluestore/BlueStore.cc

index d33755ab0596fd7fad23c6948255e070d6b93942..74b9e30d23c261ed2f3cefcf444e3f39c74e0c51 100644 (file)
@@ -7494,8 +7494,6 @@ void BlueStore::_txc_finish(TransContext *txc)
     txc->removed_collections.pop_front();
   }
 
-  _op_queue_release_deferred_throttle(txc);
-
   OpSequencerRef osr = txc->osr;
   {
     std::lock_guard<std::mutex> l(osr->qlock);
@@ -7726,6 +7724,7 @@ int BlueStore::_deferred_finish(TransContext *txc)
   std::lock_guard<std::mutex> l(kv_lock);
   txc->state = TransContext::STATE_DEFERRED_CLEANUP;
   txc->osr->qcond.notify_all();
+  _op_queue_release_deferred_throttle(txc);
   deferred_cleanup_queue.push_back(txc);
   kv_cond.notify_one();
   return 0;
@@ -7856,7 +7855,8 @@ int BlueStore::queue_transactions(
     handle->suspend_tp_timeout();
 
   _op_queue_reserve_throttle(txc);
-  _op_queue_reserve_deferred_throttle(txc);
+  if (txc->deferred_txn)
+    _op_queue_reserve_deferred_throttle(txc);
 
   if (handle)
     handle->reset_tp_timeout();