]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: drop buffer-related stats from _dispatch()
authorxie xingguo <xie.xingguo@zte.com.cn>
Mon, 1 Aug 2016 02:18:07 +0000 (10:18 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Mon, 1 Aug 2016 22:54:57 +0000 (06:54 +0800)
By moving the buffer-related stats into tick_without_osd_lock(),
we are already accurate enough updating period of these counters.
So there is no need to do this in this time-senstive method,
which holds the big osd_lock.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/osd/OSD.cc

index 3f0688dc05130cfccaada245e91caf3b82a4a93f..9dc02d41dd9e09d051c1bf0de324753cc912e1e3 100644 (file)
@@ -6268,12 +6268,6 @@ void OSD::_dispatch(Message *m)
   assert(osd_lock.is_locked());
   dout(20) << "_dispatch " << m << " " << *m << dendl;
 
-  logger->set(l_osd_buf, buffer::get_total_alloc());
-  logger->set(l_osd_history_alloc_bytes, SHIFT_ROUND_UP(buffer::get_history_alloc_bytes(), 20));
-  logger->set(l_osd_history_alloc_num, buffer::get_history_alloc_num());
-  logger->set(l_osd_cached_crc, buffer::get_cached_crc());
-  logger->set(l_osd_cached_crc_adjusted, buffer::get_cached_crc_adjusted());
-
   switch (m->get_type()) {
 
     // -- don't need lock --
@@ -6323,11 +6317,6 @@ void OSD::_dispatch(Message *m)
       dispatch_op(op);
     }
   }
-
-  logger->set(l_osd_buf, buffer::get_total_alloc());
-  logger->set(l_osd_history_alloc_bytes, SHIFT_ROUND_UP(buffer::get_history_alloc_bytes(), 20));
-  logger->set(l_osd_history_alloc_num, buffer::get_history_alloc_num());
-
 }
 
 void OSD::handle_pg_scrub(MOSDScrub *m, PG *pg)