Skip to content

Commit 13d5a5e

Browse files
gormanmingomolnar
authored andcommitted
sched/fair: Clear SMT siblings after determining the core is not idle
The clearing of SMT siblings from the SIS mask before checking for an idle core is a small but unnecessary cost. Defer the clearing of the siblings until the scan moves to the next potential target. The cost of this was not measured as it is borderline noise but it should be self-evident. Signed-off-by: Mel Gorman <mgorman@techsingularity.net> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Reviewed-by: Vincent Guittot <vincent.guittot@linaro.org> Link: https://lkml.kernel.org/r/20201130144020.GS3371@techsingularity.net
1 parent 59a74b1 commit 13d5a5e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

kernel/sched/fair.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6086,10 +6086,11 @@ static int select_idle_core(struct task_struct *p, struct sched_domain *sd, int
60866086
break;
60876087
}
60886088
}
6089-
cpumask_andnot(cpus, cpus, cpu_smt_mask(core));
60906089

60916090
if (idle)
60926091
return core;
6092+
6093+
cpumask_andnot(cpus, cpus, cpu_smt_mask(core));
60936094
}
60946095

60956096
/*

0 commit comments

Comments
 (0)