From 80780b95aeb3fdbba8f757e56e637ef4f0083544 Mon Sep 17 00:00:00 2001 From: xie xingguo Date: Thu, 4 Aug 2016 14:37:38 +0800 Subject: [PATCH] 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 --- src/osd/OSD.cc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 5248d7a90c4bb..ea305088f4c21 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)); } -- 2.39.5