From: Sridhar Seshasayee Date: Tue, 12 Jan 2021 11:32:37 +0000 (+0530) Subject: osd: Handle configuration changes to mclock config options X-Git-Tag: v17.0.0~39^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=96b2066e8a3b74bb872b3f25b9c754b0f6d9c0ad;p=ceph.git osd: Handle configuration changes to mclock config options Handle configuration changes to the mclock cost per io, the max capacity options and the mclock profile. Handle the case where the profile is changed from a built-in profile to the custom profile. Signed-off-by: Sridhar Seshasayee --- diff --git a/src/osd/scheduler/mClockScheduler.cc b/src/osd/scheduler/mClockScheduler.cc index 2b3619111bd3a..74118dca4395d 100644 --- a/src/osd/scheduler/mClockScheduler.cc +++ b/src/osd/scheduler/mClockScheduler.cc @@ -418,7 +418,34 @@ void mClockScheduler::handle_conf_change( const ConfigProxy& conf, const std::set &changed) { - client_registry.update_from_config(conf); + if (changed.count("osd_mclock_cost_per_io_msec") || + changed.count("osd_mclock_cost_per_io_msec_hdd") || + changed.count("osd_mclock_cost_per_io_msec_ssd")) { + set_osd_mclock_cost_per_io(); + } + if (changed.count("osd_mclock_max_capacity_iops") || + changed.count("osd_mclock_max_capacity_iops_hdd") || + changed.count("osd_mclock_max_capacity_iops_ssd")) { + set_max_osd_capacity(); + enable_mclock_profile(); + client_registry.update_from_config(conf); + } + if (changed.count("osd_mclock_profile")) { + enable_mclock_profile(); + if (mclock_profile != "custom") { + client_registry.update_from_config(conf); + } + } + if (changed.count("osd_mclock_scheduler_client_res") || + changed.count("osd_mclock_scheduler_client_wgt") || + changed.count("osd_mclock_scheduler_client_lim") || + changed.count("osd_mclock_scheduler_background_recovery_res") || + changed.count("osd_mclock_scheduler_background_recovery_wgt") || + changed.count("osd_mclock_scheduler_background_recovery_lim")) { + if (mclock_profile == "custom") { + client_registry.update_from_config(conf); + } + } } }