scheduler_dynamic: move busy_threads_present
At this time only main lcore frequency is changed, depending on its load either up or down. Exception is when at least a single busy thread is present on non-g_main_lcore. Then the main lcore frequency is set to the maximum possible. This patch moves when that is determined, from 'moving' logic to one that sets reactors to interrupt mode. If at least one thread is present on non-g_main_lcore, it has to be busy. Otherwise it would be placed on main lcore. Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Change-Id: I2900598afe53fb609e1f06a60d5245f74511e1c3 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8050 Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot
This commit is contained in:
parent
5e4fbe7364
commit
286a43f512
@ -188,7 +188,6 @@ balance(struct spdk_scheduler_core_info *cores_info, int cores_count,
|
||||
g_cores[i].thread_count--;
|
||||
|
||||
if (target_lcore != g_main_lcore) {
|
||||
busy_threads_present = true;
|
||||
main_core->idle += spdk_min(UINT64_MAX - main_core->idle, thread_busy);
|
||||
main_core->busy -= spdk_min(main_core->busy, thread_busy);
|
||||
}
|
||||
@ -226,8 +225,6 @@ balance(struct spdk_scheduler_core_info *cores_info, int cores_count,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
busy_threads_present = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -243,6 +240,11 @@ balance(struct spdk_scheduler_core_info *cores_info, int cores_count,
|
||||
core->interrupt_mode = true;
|
||||
} else if (g_cores[i].thread_count != 0) {
|
||||
core->interrupt_mode = false;
|
||||
if (i != g_main_lcore) {
|
||||
/* If a thread is present on non g_main_lcore,
|
||||
* it has to be busy. */
|
||||
busy_threads_present = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user