[PATCH OLK-5.10 V1] sched/fair: Fix the bug in dynamic smt when getting physical core load

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

反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://gitee.com/openeuler/kernel/pulls/16033 邮件列表地址:https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/C3R... FeedBack: The patch(es) which you have sent to kernel@openeuler.org mailing list has been converted to a pull request successfully! Pull request link: https://gitee.com/openeuler/kernel/pulls/16033 Mailing list address: https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/C3R...
participants (2)
-
Cheng Yu
-
patchwork bot