Skip to content

Commit 8eeeed9

Browse files
Abel-WYPeter Zijlstra
authored andcommitted
sched/fair: Remove useless check in select_idle_core()
The function select_idle_core() only gets called when has_idle_cores is true which can be possible only when sched_smt_present is enabled. This change also aligns select_idle_core() with select_idle_smt() in the way that the caller do the check if necessary. Signed-off-by: Abel Wu <wuyun.abel@bytedance.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Mel Gorman <mgorman@techsingularity.net> Link: https://lore.kernel.org/r/20220907112000.1854-4-wuyun.abel@bytedance.com
1 parent b9bae70 commit 8eeeed9

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

kernel/sched/fair.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6321,9 +6321,6 @@ static int select_idle_core(struct task_struct *p, int core, struct cpumask *cpu
63216321
bool idle = true;
63226322
int cpu;
63236323

6324-
if (!static_branch_likely(&sched_smt_present))
6325-
return __select_idle_cpu(core, p);
6326-
63276324
for_each_cpu(cpu, cpu_smt_mask(core)) {
63286325
if (!available_idle_cpu(cpu)) {
63296326
idle = false;

0 commit comments

Comments
 (0)