
hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/IC4CNP CVE: NA -------------------------------- Fix a bug in the dynamic smt feature. Specifically, when determining whether a physical core has idle capacity, there is a bug in obtaining the load of the core. We should use "core_id" instead of "cpu". Signed-off-by: Cheng Yu <serein.chengyu@huawei.com> --- kernel/sched/fair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 5fc8d6a25b9a..e9e4765b0d6e 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -7334,7 +7334,7 @@ static bool core_has_spare(int cpu) { int core_id = cpumask_first(cpu_smt_mask(cpu)); struct rq *rq = cpu_rq(core_id); - unsigned long util = cpu_util(cpu); + unsigned long util = cpu_util(core_id); unsigned long capacity = rq->cpu_capacity; if (sysctl_sched_util_ratio == 100) -- 2.25.1