From 3e6ad89c282ab5a03702e312a4be11276a45755a 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 (cherry picked from commit 18043c5e88d241f43b8fd23a8cbc1b15a3854de9) Conflicts: - file: src/osd/OSD.cc comment: `OSD::maybe_override_cost_for_qos()` was removed as part of the backport that included mClock changes for PG delete operation --- src/osd/OSD.cc | 16 +++------------- src/osd/OSD.h | 1 - 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 75087cea2d2..0b5636df970 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -10078,7 +10078,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"); @@ -10182,8 +10182,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}, @@ -10284,8 +10283,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)); @@ -10370,14 +10368,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 44976e33bf3..a54d49975eb 100644 --- a/src/osd/OSD.h +++ b/src/osd/OSD.h @@ -2038,7 +2038,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