Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit ae2ad29

Browse files
MiaoheLinPeter Zijlstra
authored andcommitted
sched/fair: Use recent_used_cpu to test p->cpus_ptr
When checking whether a recently used CPU can be a potential idle candidate, recent_used_cpu should be used to test p->cpus_ptr as p->recent_used_cpu is not equal to recent_used_cpu and candidate decision is made based on recent_used_cpu here. Fixes: 89aafd6 ("sched/fair: Use prev instead of new target as recent_used_cpu") Signed-off-by: Miaohe Lin <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Reviewed-by: Phil Auld <[email protected]> Acked-by: Mel Gorman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 06c2afb commit ae2ad29

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/sched/fair.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7174,7 +7174,7 @@ static int select_idle_sibling(struct task_struct *p, int prev, int target)
71747174
recent_used_cpu != target &&
71757175
cpus_share_cache(recent_used_cpu, target) &&
71767176
(available_idle_cpu(recent_used_cpu) || sched_idle_cpu(recent_used_cpu)) &&
7177-
cpumask_test_cpu(p->recent_used_cpu, p->cpus_ptr) &&
7177+
cpumask_test_cpu(recent_used_cpu, p->cpus_ptr) &&
71787178
asym_fits_cpu(task_util, util_min, util_max, recent_used_cpu)) {
71797179
return recent_used_cpu;
71807180
}

0 commit comments

Comments
 (0)