From: xie xingguo Date: Thu, 4 Aug 2016 06:37:38 +0000 (+0800) Subject: osd: move methods which don't need osd_lock from tick into tick_without_osd_lock() X-Git-Tag: v11.0.1~409^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=80780b95aeb3fdbba8f757e56e637ef4f0083544;p=ceph.git osd: move methods which don't need osd_lock from tick into tick_without_osd_lock() 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 --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 5248d7a90c4b..ea305088f4c2 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -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)); }