]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
os/bluestore: revert throttle perfcounters
authorSage Weil <sage@redhat.com>
Wed, 8 Mar 2017 20:45:31 +0000 (15:45 -0500)
committerSage Weil <sage@redhat.com>
Tue, 21 Mar 2017 18:56:27 +0000 (13:56 -0500)
This reverts 3e40595f3cd8626cdceffa4a3a4efb088127f726

The individual throttles have their own set of perfcounters; no need to
duplicate them here.

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

index 74b9e30d23c261ed2f3cefcf444e3f39c74e0c51..4fae0a27fa32abcdb32e3a8388cbcb20dd7abeda 100644 (file)
@@ -3439,15 +3439,6 @@ void BlueStore::_init_logger()
   b.add_u64(l_bluestore_write_small_new, "bluestore_write_small_new",
            "Small write into new (sparse) blob");
 
-  b.add_u64(l_bluestore_cur_ops_in_queue, "bluestore_cur_ops_in_queue",
-        "Current ops in queue");
-  b.add_u64(l_bluestore_cur_bytes_in_queue, "bluestore_cur_bytes_in_queue",
-        "Current bytes in queue");
-  b.add_u64(l_bluestore_cur_ops_in_deferred_queue, "bluestore_cur_ops_in_deferred_queue",
-        "Current deferred ops in queue");
-  b.add_u64(l_bluestore_cur_bytes_in_deferred_queue, "bluestore_cur_bytes_in_deferred_queue",
-        "Current deferred bytes in queue");
-
   b.add_u64(l_bluestore_txc, "bluestore_txc", "Transactions committed");
   b.add_u64(l_bluestore_onode_reshard, "bluestore_onode_reshard",
            "Onode extent map reshard events");
@@ -7476,7 +7467,8 @@ void BlueStore::_txc_committed_kv(TransContext *txc)
   if (!txc->oncommits.empty()) {
     finishers[n]->queue(txc->oncommits);
   }
-  _op_queue_release_throttle(txc);
+  throttle_ops.put(txc->ops);
+  throttle_bytes.put(txc->bytes);
 }
 
 void BlueStore::_txc_finish(TransContext *txc)
@@ -7724,7 +7716,8 @@ 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);
+  throttle_deferred_ops.put(txc->ops);
+  throttle_deferred_bytes.put(txc->bytes);
   deferred_cleanup_queue.push_back(txc);
   kv_cond.notify_one();
   return 0;
@@ -7854,9 +7847,12 @@ int BlueStore::queue_transactions(
   if (handle)
     handle->suspend_tp_timeout();
 
-  _op_queue_reserve_throttle(txc);
-  if (txc->deferred_txn)
-    _op_queue_reserve_deferred_throttle(txc);
+  throttle_ops.get(txc->ops);
+  throttle_bytes.get(txc->bytes);
+  if (txc->deferred_txn) {
+    throttle_deferred_ops.get(txc->ops);
+    throttle_deferred_bytes.get(txc->bytes);
+  }
 
   if (handle)
     handle->reset_tp_timeout();
@@ -7870,42 +7866,6 @@ int BlueStore::queue_transactions(
   return 0;
 }
 
-void BlueStore::_op_queue_reserve_throttle(TransContext *txc)
-{
-  throttle_ops.get(txc->ops);
-  throttle_bytes.get(txc->bytes);
-
-  logger->set(l_bluestore_cur_ops_in_queue, throttle_ops.get_current());
-  logger->set(l_bluestore_cur_bytes_in_queue, throttle_bytes.get_current());
-}
-
-void BlueStore::_op_queue_release_throttle(TransContext *txc)
-{
-  throttle_ops.put(txc->ops);
-  throttle_bytes.put(txc->bytes);
-
-  logger->set(l_bluestore_cur_ops_in_queue, throttle_ops.get_current());
-  logger->set(l_bluestore_cur_bytes_in_queue, throttle_bytes.get_current());
-}
-
-void BlueStore::_op_queue_reserve_deferred_throttle(TransContext *txc)
-{
-  throttle_deferred_ops.get(txc->ops);
-  throttle_deferred_bytes.get(txc->bytes);
-
-  logger->set(l_bluestore_cur_ops_in_deferred_queue, throttle_deferred_ops.get_current());
-  logger->set(l_bluestore_cur_bytes_in_deferred_queue, throttle_deferred_bytes.get_current());
-}
-
-void BlueStore::_op_queue_release_deferred_throttle(TransContext *txc)
-{
-  throttle_deferred_ops.put(txc->ops);
-  throttle_deferred_bytes.put(txc->bytes);
-
-  logger->set(l_bluestore_cur_ops_in_deferred_queue, throttle_deferred_ops.get_current());
-  logger->set(l_bluestore_cur_bytes_in_deferred_queue, throttle_deferred_bytes.get_current());
-}
-
 void BlueStore::_txc_aio_submit(TransContext *txc)
 {
   dout(10) << __func__ << " txc " << txc << dendl;
index 991dfcae14ba1c19890909be8c86276085e0165b..a9ee843954f8e6aee8094f4276e2efafb9b32a65 100644 (file)
@@ -102,12 +102,6 @@ enum {
   l_bluestore_write_small_deferred,
   l_bluestore_write_small_pre_read,
   l_bluestore_write_small_new,
-
-  l_bluestore_cur_ops_in_queue,
-  l_bluestore_cur_bytes_in_queue,
-  l_bluestore_cur_ops_in_deferred_queue,
-  l_bluestore_cur_bytes_in_deferred_queue,
-
   l_bluestore_txc,
   l_bluestore_onode_reshard,
   l_bluestore_blob_split,
@@ -2417,11 +2411,6 @@ private:
                        CollectionRef& c,
                        CollectionRef& d,
                        unsigned bits, int rem);
-
-  void _op_queue_reserve_throttle(TransContext *txc);
-  void _op_queue_release_throttle(TransContext *txc);
-  void _op_queue_reserve_deferred_throttle(TransContext *txc);
-  void _op_queue_release_deferred_throttle(TransContext *txc);
 };
 
 inline ostream& operator<<(ostream& out, const BlueStore::OpSequencer& s) {