From 78df9b3e4d08adf9751aa41cca5526d52ccdda21 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 8 Mar 2017 14:57:52 -0500 Subject: [PATCH] os/bluestore: release deferred throttle on io finish, before cleanup 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 --- src/os/bluestore/BlueStore.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index d33755ab0596f..74b9e30d23c26 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -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 l(osr->qlock); @@ -7726,6 +7724,7 @@ int BlueStore::_deferred_finish(TransContext *txc) std::lock_guard 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(); -- 2.39.5