]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/osd/scheduler/mClockScheduler.h
import quincy beta 17.1.0
[ceph.git] / ceph / src / osd / scheduler / mClockScheduler.h
index faee092f665d2bccf59dad4a9476e530c752d901..cb53412c7e0f8f97f9d465fc97860e866d9914a7 100644 (file)
@@ -42,6 +42,13 @@ using profile_id_t = uint64_t;
 struct client_profile_id_t {
   client_id_t client_id;
   profile_id_t profile_id;
+
+  friend std::ostream& operator<<(std::ostream& out,
+                                  const client_profile_id_t& client_profile) {
+    out << " client_id: " << client_profile.client_id
+        << " profile_id: " << client_profile.profile_id;
+    return out;
+  }
 };
 
 WRITE_EQ_OPERATORS_2(client_profile_id_t, client_id, profile_id)
@@ -51,6 +58,13 @@ WRITE_CMP_OPERATORS_2(client_profile_id_t, client_id, profile_id)
 struct scheduler_id_t {
   op_scheduler_class class_id;
   client_profile_id_t client_profile_id;
+
+  friend std::ostream& operator<<(std::ostream& out,
+                                  const scheduler_id_t& sched_id) {
+    out << "{ class_id: " << sched_id.class_id
+        << sched_id.client_profile_id;
+    return out << " }";
+  }
 };
 
 WRITE_EQ_OPERATORS_2(scheduler_id_t, class_id, client_profile_id)
@@ -172,6 +186,9 @@ public:
   // Calculate scale cost per item
   int calc_scaled_cost(int cost);
 
+  // Helper method to display mclock queues
+  std::string display_queues() const;
+
   // Enqueue op in the back of the regular queue
   void enqueue(OpSchedulerItem &&item) final;
 
@@ -193,6 +210,9 @@ public:
     ostream << "mClockScheduler";
   }
 
+  // Update data associated with the modified mclock config key(s)
+  void update_configuration() final;
+
   const char** get_tracked_conf_keys() const final;
   void handle_conf_change(const ConfigProxy& conf,
                          const std::set<std::string> &changed) final;