{
auto id = get_scheduler_id(item);
unsigned priority = item.get_priority();
- unsigned cutoff = get_io_prio_cut(cct);
// TODO: move this check into OpSchedulerItem, handle backwards compat
if (op_scheduler_class::immediate == id.class_id) {
enqueue_high(immediate_class_priority, std::move(item));
- } else if (priority >= cutoff) {
+ } else if (priority >= cutoff_priority) {
enqueue_high(priority, std::move(item));
} else {
auto cost = calc_scaled_cost(item.get_cost());
void mClockScheduler::enqueue_front(OpSchedulerItem&& item)
{
unsigned priority = item.get_priority();
- unsigned cutoff = get_io_prio_cut(cct);
auto id = get_scheduler_id(item);
if (op_scheduler_class::immediate == id.class_id) {
enqueue_high(immediate_class_priority, std::move(item), true);
- } else if (priority >= cutoff) {
+ } else if (priority >= cutoff_priority) {
enqueue_high(priority, std::move(item), true);
} else {
// mClock does not support enqueue at front, so we use
}
}
+ unsigned cutoff_priority = get_io_prio_cut(cct);
+
/**
* set_osd_capacity_params_from_config
*
// Set the mclock related config params based on the profile
void set_config_defaults_from_profile();
-public:
+public:
mClockScheduler(CephContext *cct, int whoami, uint32_t num_shards,
int shard_id, bool is_rotational, MonClient *monc);
~mClockScheduler() override;