aboutsummaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorAbel Wu <[email protected]>2022-09-07 19:19:58 +0800
committerPeter Zijlstra <[email protected]>2022-09-07 21:53:46 +0200
commit8eeeed9c4a791f0d1f2ea830eb75a4246c117ae2 (patch)
treeef4316da4bbe18bf4980c14fde6ab61ced927299 /kernel
parentb9bae70440d21e106fbc098803b5a190df65f2e0 (diff)
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 <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Acked-by: Mel Gorman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched/fair.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 1ad79aaaaf93..03ce65068333 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -6321,9 +6321,6 @@ static int select_idle_core(struct task_struct *p, int core, struct cpumask *cpu
bool idle = true;
int cpu;
- if (!static_branch_likely(&sched_smt_present))
- return __select_idle_cpu(core, p);
-
for_each_cpu(cpu, cpu_smt_mask(core)) {
if (!available_idle_cpu(cpu)) {
idle = false;