Commit 2779e39b authored by Jim Harris's avatar Jim Harris Committed by Tomasz Zawadzki
Browse files

gscheduler: use 1% instead of 0.1% for min/max calculations



Upcoming patches will allow for configuring gscheduler parameters.
There doesn't seem to be a need to allow for .1% granularity, so change
the 1000 values to 100, to make the calculations based on 99% busy or
99% idle.

Signed-off-by: default avatarJim Harris <jim.harris@samsung.com>
Change-Id: I2a8297a2d629cedef66e79a7b427dab187362416
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/23383


Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: default avatarKrzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent f2a6a84a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ balance(struct spdk_scheduler_core_info *cores, uint32_t core_count)
			return;
		}

		if (core->current_busy_tsc < (core->current_idle_tsc / 1000)) {
		if (core->current_busy_tsc < (core->current_idle_tsc / 100)) {
			rc = governor->set_core_freq_min(core->lcore);
			if (rc < 0) {
				SPDK_ERRLOG("setting to minimal frequency for core %u failed\n", core->lcore);
@@ -57,7 +57,7 @@ balance(struct spdk_scheduler_core_info *cores, uint32_t core_count)
			if (rc < 0) {
				SPDK_ERRLOG("lowering frequency for core %u failed\n", core->lcore);
			}
		} else if (core->current_idle_tsc < (core->current_busy_tsc / 1000)) {
		} else if (core->current_idle_tsc < (core->current_busy_tsc / 100)) {
			rc = governor->set_core_freq_max(core->lcore);
			if (rc < 0) {
				SPDK_ERRLOG("setting to maximal frequency for core %u failed\n", core->lcore);