Unverified Commit 53e3852f authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!10194 sched/fair: Take the scheduling domain into account in select_idle_core()

parents c9155daa e37deb24
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -7223,11 +7223,7 @@ static int select_idle_core(struct task_struct *p, int core, struct cpumask *cpu
		if (!available_idle_cpu(cpu)) {
			idle = false;
			if (*idle_cpu == -1) {
#ifdef CONFIG_TASK_PLACEMENT_BY_CPU_RANGE
				if (sched_idle_cpu(cpu) && cpumask_test_cpu(cpu, p->select_cpus)) {
#else
				if (sched_idle_cpu(cpu) && cpumask_test_cpu(cpu, p->cpus_ptr)) {
#endif
				if (sched_idle_cpu(cpu) && cpumask_test_cpu(cpu, cpus)) {
					*idle_cpu = cpu;
					break;
				}
@@ -7235,7 +7231,7 @@ static int select_idle_core(struct task_struct *p, int core, struct cpumask *cpu
			}
			break;
		}
		if (*idle_cpu == -1 && cpumask_test_cpu(cpu, p->cpus_ptr))
		if (*idle_cpu == -1 && cpumask_test_cpu(cpu, cpus))
			*idle_cpu = cpu;
	}