From: Jianpeng Ma Date: Wed, 26 Apr 2017 07:07:51 +0000 (+0800) Subject: os/BlueStore: In osd_tp_thread, call _txc_finalize_kv. X-Git-Tag: v12.0.3~107^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bdf340f99c89d5a18de82b4a14eea9010c264d93;p=ceph.git os/BlueStore: In osd_tp_thread, call _txc_finalize_kv. To reduce overhead of _kv_sync_thread, make _txc_finalize_kv do in_osd_tp_thread. Signed-off-by: Jianpeng Ma --- diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index b08a7bcab8ed..5798ce420765 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -7383,7 +7383,6 @@ void BlueStore::_txc_state_proc(TransContext *txc) dout(20) << __func__ << " DEBUG randomly forcing submit via kv thread" << dendl; } else { - _txc_finalize_kv(txc, txc->t); txc->state = TransContext::STATE_KV_SUBMITTED; int r = db->submit_transaction(txc->t); assert(r == 0); @@ -7939,7 +7938,6 @@ void BlueStore::_kv_sync_thread() } for (auto txc : kv_submitting) { assert(txc->state == TransContext::STATE_KV_QUEUED); - _txc_finalize_kv(txc, txc->t); txc->log_state_latency(logger, l_bluestore_state_kv_queued_lat); int r = db->submit_transaction(txc->t); assert(r == 0); @@ -8308,6 +8306,7 @@ int BlueStore::queue_transactions( txc->t->set(PREFIX_DEFERRED, key, bl); } + _txc_finalize_kv(txc, txc->t); if (handle) handle->suspend_tp_timeout();