]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
BlueStore: speedup the performance of multi-replication flow by 11844/head
authorPan Liu <pan.liu@istuary.com>
Wed, 9 Nov 2016 09:45:27 +0000 (17:45 +0800)
committerPan Liu <pan.liu@istuary.com>
Sat, 12 Nov 2016 15:22:30 +0000 (23:22 +0800)
switching the callback order in bluestore.

In Bluestore ack callback and commit callback are queued one by one in
the function "BlueStore;:_txc_finish_kv". Therefore, just only one callback
is needed to call, in order to improve performance. We do this by switching
the callback order in bluestore, and the callback work can be done in
sub_op_modify_commit and doesn't need to do it again in sub_op_modify_applied.

Signed-off-by: Pan Liu <pan.liu@istuary.com>
src/os/bluestore/BlueStore.cc

index 00a3e879a3cf30df14ed8390fc4ec3cb491114b0..aea01d5eef8d69c4a5e8ae3acef082387f1bf317 100644 (file)
@@ -6511,14 +6511,14 @@ void BlueStore::_txc_finish_kv(TransContext *txc)
     txc->onreadable_sync = NULL;
   }
   unsigned n = txc->osr->parent->shard_hint.hash_to_shard(m_finisher_num);
-  if (txc->onreadable) {
-    finishers[n]->queue(txc->onreadable);
-    txc->onreadable = NULL;
-  }
   if (txc->oncommit) {
     finishers[n]->queue(txc->oncommit);
     txc->oncommit = NULL;
   }
+  if (txc->onreadable) {
+    finishers[n]->queue(txc->onreadable);
+    txc->onreadable = NULL;
+  }
   while (!txc->oncommits.empty()) {
     auto f = txc->oncommits.front();
     finishers[n]->queue(f);