gscheduler: use current tsc for decision.
Replace total_busy/idle_tsc by current ones for decision making when tuning frequency. Change-Id: I89524a9febfa963b14c3120433e5aff9de2a28dd Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10342 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com> Reviewed-by: Dong Yi <dongx.yi@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
parent
b9518a5540
commit
97b3fb1758
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user