Commit 13d5a5e9 authored by Mel Gorman's avatar Mel Gorman Committed by Ingo Molnar
Browse files

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: default avatarMel Gorman <mgorman@techsingularity.net>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
Reviewed-by: default avatarVincent Guittot <vincent.guittot@linaro.org>
Link: https://lkml.kernel.org/r/20201130144020.GS3371@techsingularity.net
parent 59a74b15
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -6086,10 +6086,11 @@ static int select_idle_core(struct task_struct *p, struct sched_domain *sd, int
				break;
			}
		}
		cpumask_andnot(cpus, cpus, cpu_smt_mask(core));

		if (idle)
			return core;

		cpumask_andnot(cpus, cpus, cpu_smt_mask(core));
	}

	/*