]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: move methods which don't need osd_lock from tick into tick_without_osd_lock() 10572/head
authorxie xingguo <xie.xingguo@zte.com.cn>
Thu, 4 Aug 2016 06:37:38 +0000 (14:37 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Thu, 4 Aug 2016 21:57:21 +0000 (05:57 +0800)
These methods can be actually called without osd_lock in hand(have their own locks),
so it is good for performance to move them into tick_without_osd_lock() instead.

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

index 5248d7a90c4bbb865abbb31cb54ea962c3436774..ea305088f4c2107a1875f2f2351a2cdf5a695b30 100644 (file)
@@ -4320,16 +4320,10 @@ void OSD::tick()
 
   if (is_active()) {
     check_replay_queue();
-
-    service.promote_throttle_recalibrate();
   }
 
   do_waiters();
 
-  check_ops_in_flight();
-
-  service.kick_recovery_queue();
-
   tick_timer.add_event_after(OSD_TICK_INTERVAL, new C_Tick(this));
 }
 
@@ -4402,7 +4396,11 @@ void OSD::tick_without_osd_lock()
     if (!scrub_random_backoff()) {
       sched_scrub();
     }
+    service.promote_throttle_recalibrate();
   }
+
+  check_ops_in_flight();
+  service.kick_recovery_queue();
   tick_timer_without_osd_lock.add_event_after(OSD_TICK_INTERVAL, new C_Tick_WithoutOSDLock(this));
 }