diff --git a/module/scheduler/gscheduler/gscheduler.c b/module/scheduler/gscheduler/gscheduler.c index 5c304f9a71..b68aa7daf4 100644 --- a/module/scheduler/gscheduler/gscheduler.c +++ b/module/scheduler/gscheduler/gscheduler.c @@ -75,17 +75,17 @@ balance(struct spdk_scheduler_core_info *cores, uint32_t core_count) return; } - if (core->total_busy_tsc < (core->total_idle_tsc / 1000)) { + if (core->current_busy_tsc < (core->current_idle_tsc / 1000)) { rc = governor->set_core_freq_min(core->lcore); if (rc < 0) { SPDK_ERRLOG("setting to minimal frequency for core %u failed\n", core->lcore); } - } else if (core->total_idle_tsc > core->total_busy_tsc) { + } else if (core->current_idle_tsc > core->current_busy_tsc) { rc = governor->core_freq_down(core->lcore); if (rc < 0) { SPDK_ERRLOG("lowering frequency for core %u failed\n", core->lcore); } - } else if (core->total_idle_tsc < (core->total_busy_tsc / 1000)) { + } else if (core->current_idle_tsc < (core->current_busy_tsc / 1000)) { rc = governor->set_core_freq_max(core->lcore); if (rc < 0) { SPDK_ERRLOG("setting to maximal frequency for core %u failed\n", core->lcore);