From 144716609a9cdcc3dd74b3d2e2f134018c40210e Mon Sep 17 00:00:00 2001 From: zhangwei123171 Date: Tue, 25 Nov 2025 16:33:17 +0800 Subject: [PATCH] sched: fix cpu check logic in soft domain jingdong inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/ID8K6S -------------------------------- in select_idle_cpu, we should check with cpus soft domain case. Fixes: 2bd01fbe4c47 ("sched: fair: Select idle cpu in soft domain") Signed-off-by: zhangwei123171 --- 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 6b30b3811c88..dc22e76fd6c9 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -8322,7 +8322,7 @@ static int select_idle_cpu(struct task_struct *p, struct sched_domain *sd, bool struct cpumask *tmpmask = to_cpumask(tg->sf_ctx->span); for_each_cpu_wrap(cpu, tmpmask, target + 1) { - if (!cpumask_test_cpu(cpu, tmpmask)) + if (!cpumask_test_cpu(cpu, cpus)) continue; if (has_idle_core) { -- Gitee