]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: Remove check on osd_pg_delete_cost change 56475/head
authorAishwarya Mathuria <amathuri@redhat.com>
Fri, 9 Feb 2024 07:01:35 +0000 (07:01 +0000)
committerAishwarya Mathuria <amathuri@redhat.com>
Tue, 26 Mar 2024 11:29:29 +0000 (16:59 +0530)
With the new cost estimation technique, we don't need osd_pg_delete_cost to be hard-coded to one particular value.
Hence we can now remove the check we had previously added to prevent users from modifying deletion cost with mClock.

Signed-off-by: Aishwarya Mathuria <amathuri@redhat.com>
(cherry picked from commit 56c681c39a35686368e43e3baabcc7e7c5bd8b72)

src/osd/OSD.cc
src/osd/OSD.h

index a341000ff9c8592b9ff103d883fc546fa510f4ef..48ac685acbaf10040e227244250ff87e0a957084 100644 (file)
@@ -4080,7 +4080,6 @@ int OSD::init()
 
   // Override a few options if mclock scheduler is enabled.
   maybe_override_sleep_options_for_qos();
-  maybe_override_cost_for_qos();
   maybe_override_options_for_qos();
   maybe_override_max_osd_capacity_for_qos();
 
@@ -9950,9 +9949,6 @@ void OSD::handle_conf_change(const ConfigProxy& conf,
       changed.count("osd_recovery_sleep_hybrid")) {
     maybe_override_sleep_options_for_qos();
   }
-  if (changed.count("osd_pg_delete_cost")) {
-    maybe_override_cost_for_qos();
-  }
   if (changed.count("osd_min_recovery_priority")) {
     service.local_reserver.set_min_priority(cct->_conf->osd_min_recovery_priority);
     service.remote_reserver.set_min_priority(cct->_conf->osd_min_recovery_priority);
@@ -10275,15 +10271,6 @@ void OSD::maybe_override_sleep_options_for_qos()
   }
 }
 
-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()) {
-    uint64_t pg_delete_cost = 1048576;
-    cct->_conf.set_val("osd_pg_delete_cost", std::to_string(pg_delete_cost));
-  }
-}
 
 /**
  * A context for receiving status from a background mon command to set
index 4b8a8659f2bf36642195850080a0713a72f617b0..b0b4bb9727a789997e62e1189649cb213a0b885f 100644 (file)
@@ -2016,7 +2016,6 @@ private:
   void maybe_override_sleep_options_for_qos();
   bool maybe_override_options_for_qos(
     const std::set<std::string> *changed = nullptr);
-  void maybe_override_cost_for_qos();
   int run_osd_bench_test(int64_t count,
                          int64_t bsize,
                          int64_t osize,