From 18043c5e88d241f43b8fd23a8cbc1b15a3854de9 Mon Sep 17 00:00:00 2001 From: Aishwarya Mathuria Date: Thu, 13 Jul 2023 23:35:42 +0530 Subject: [PATCH] osd: Remove usage of unsupported objstores for QoS mClock is supported on Bluestore and a check is currently done to eliminate other unsupported object stores. With Filestore no longer in the code base, this check can be removed. In addition, make sure that osd bench will no longer run on setups with memstore. Fixes: https://tracker.ceph.com/issues/59531 Signed-off-by: Aishwarya Mathuria --- src/osd/OSD.cc | 19 ++++--------------- src/osd/OSD.h | 1 - 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index ab83ef7ba4f6c..9e6b3fd9d929c 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -9991,7 +9991,7 @@ void OSD::maybe_override_max_osd_capacity_for_qos() // osd bench test. This is later used to setup mclock. if ((op_queue_type_t::mClockScheduler == osd_op_queue_type()) && (cct->_conf.get_val("osd_mclock_skip_benchmark") == false) && - (!unsupported_objstore_for_qos())) { + (store->get_type() != "memstore")) { std::string max_capacity_iops_config; bool force_run_benchmark = cct->_conf.get_val("osd_mclock_force_run_benchmark_on_init"); @@ -10089,8 +10089,7 @@ bool OSD::maybe_override_options_for_qos(const std::set *changed) { // Override options only if the scheduler enabled is mclock and the // underlying objectstore is supported by mclock - if (op_queue_type_t::mClockScheduler == osd_op_queue_type() && - !unsupported_objstore_for_qos()) { + if (op_queue_type_t::mClockScheduler == osd_op_queue_type()) { static const std::map recovery_qos_defaults { {"osd_recovery_max_active", 0}, {"osd_recovery_max_active_hdd", 3}, @@ -10191,8 +10190,7 @@ void OSD::maybe_override_sleep_options_for_qos() { // Override options only if the scheduler enabled is mclock and the // underlying objectstore is supported by mclock - if (op_queue_type_t::mClockScheduler == osd_op_queue_type() && - !unsupported_objstore_for_qos()) { + if (op_queue_type_t::mClockScheduler == osd_op_queue_type()) { // Override the various sleep settings // Disable recovery sleep cct->_conf.set_val("osd_recovery_sleep", std::to_string(0)); @@ -10221,8 +10219,7 @@ void OSD::maybe_override_cost_for_qos() { // If the scheduler enabled is mclock, override the default PG deletion cost // so that mclock can meet the QoS goals. - if (op_queue_type_t::mClockScheduler == osd_op_queue_type() && - !unsupported_objstore_for_qos()) { + if (op_queue_type_t::mClockScheduler == osd_op_queue_type()) { uint64_t pg_delete_cost = 15728640; cct->_conf.set_val("osd_pg_delete_cost", std::to_string(pg_delete_cost)); } @@ -10287,14 +10284,6 @@ void OSD::mon_cmd_set_config(const std::string &key, const std::string &val) monc->start_mon_command(vcmd, {}, nullptr, nullptr, on_finish); } -bool OSD::unsupported_objstore_for_qos() -{ - static const std::vector unsupported_objstores = { "filestore" }; - return std::find(unsupported_objstores.begin(), - unsupported_objstores.end(), - store->get_type()) != unsupported_objstores.end(); -} - op_queue_type_t OSD::osd_op_queue_type() const { /** diff --git a/src/osd/OSD.h b/src/osd/OSD.h index 7cd7f8423f091..5f561e6431824 100644 --- a/src/osd/OSD.h +++ b/src/osd/OSD.h @@ -1992,7 +1992,6 @@ private: double *elapsed, std::ostream& ss); void mon_cmd_set_config(const std::string &key, const std::string &val); - bool unsupported_objstore_for_qos(); void scrub_purged_snaps(); void probe_smart(const std::string& devid, std::ostream& ss); -- 2.39.5