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

!2765 Remove invalid cpu selection logic in dynamic affinity

Merge Pull Request from: @zhangwei123171 
 
 The CPU selected by  select_task_rq_fair may not be in the corresponding cpuset. 
  This will be corrected in the subsequent fallback process.
    
  dynamic affinity should not break this logic.

https://gitee.com/openeuler/kernel/issues/I8E8DQ 
 
Link:https://gitee.com/openeuler/kernel/pulls/2765

 

Reviewed-by: default avatarZucheng Zheng <zhengzucheng@huawei.com>
Signed-off-by: default avatarJialin Zhang <zhangjialin11@huawei.com>
parents a1a3f11f 792d1aeb
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -7413,7 +7413,7 @@ select_task_rq_fair(struct task_struct *p, int prev_cpu, int sd_flag, int wake_f
	int ret;
#endif
#ifdef CONFIG_QOS_SCHED_DYNAMIC_AFFINITY
	int idlest_cpu = 0;
	int idlest_cpu = -1;
#endif

	time = schedstat_start_time();
@@ -7526,7 +7526,7 @@ select_task_rq_fair(struct task_struct *p, int prev_cpu, int sd_flag, int wake_f
	rcu_read_unlock();

#ifdef CONFIG_QOS_SCHED_DYNAMIC_AFFINITY
	if (!cpumask_test_cpu(new_cpu, p->select_cpus)) {
	if (idlest_cpu != -1 && !cpumask_test_cpu(new_cpu, p->select_cpus)) {
		new_cpu = idlest_cpu;
		schedstat_inc(p->se.statistics.nr_wakeups_force_preferred_cpus);
	}