mirror of
https://github.com/ceph/ceph
synced 2025-02-21 18:17:42 +00:00
Merge pull request #52809 from sseshasa/wip-mclock-client-lim-62293
osd/scheduler/mClockScheduler: Use same profile and client ids for all clients to ensure allocated QoS limit consumption. Reviewed-by: Samuel Just <sjust@redhat.com>
This commit is contained in:
commit
8394bd6c83
@ -38,12 +38,30 @@ constexpr double default_max = std::numeric_limits<double>::is_iec559 ?
|
||||
std::numeric_limits<double>::infinity() :
|
||||
std::numeric_limits<double>::max();
|
||||
|
||||
using client_id_t = uint64_t;
|
||||
using profile_id_t = uint64_t;
|
||||
|
||||
/**
|
||||
* client_profile_id_t
|
||||
*
|
||||
* client_id - global id (client.####) for client QoS
|
||||
* profile_id - id generated by client's QoS profile
|
||||
*
|
||||
* Currently (Reef and below), both members are set to
|
||||
* 0 which ensures that all external clients share the
|
||||
* mClock profile allocated reservation and limit
|
||||
* bandwidth.
|
||||
*
|
||||
* Note: Post Reef, both members will be set to non-zero
|
||||
* values when the distributed feature of the mClock
|
||||
* algorithm is utilized.
|
||||
*/
|
||||
struct client_profile_id_t {
|
||||
client_id_t client_id;
|
||||
profile_id_t profile_id;
|
||||
uint64_t client_id = 0;
|
||||
uint64_t profile_id = 0;
|
||||
|
||||
client_profile_id_t(uint64_t _client_id, uint64_t _profile_id) :
|
||||
client_id(_client_id),
|
||||
profile_id(_profile_id) {}
|
||||
|
||||
client_profile_id_t() = default;
|
||||
|
||||
auto operator<=>(const client_profile_id_t&) const = default;
|
||||
friend std::ostream& operator<<(std::ostream& out,
|
||||
@ -177,10 +195,7 @@ class mClockScheduler : public OpScheduler, md_config_obs_t {
|
||||
static scheduler_id_t get_scheduler_id(const OpSchedulerItem &item) {
|
||||
return scheduler_id_t{
|
||||
item.get_scheduler_class(),
|
||||
client_profile_id_t{
|
||||
item.get_owner(),
|
||||
0
|
||||
}
|
||||
client_profile_id_t()
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user