Messages in this thread Patch in this message | | | From | Abel Wu <> | Subject | [PATCH v2 3/5] sched/fair: remove useless check in select_idle_core | Date | Thu, 1 Sep 2022 21:11:05 +0800 |
| |
The function only gets called when sds->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 that the caller do the check if necessary.
Signed-off-by: Abel Wu <wuyun.abel@bytedance.com> Acked-by: Mel Gorman <mgorman@techsingularity.net> --- kernel/sched/fair.c | 3 --- 1 file changed, 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; -- 2.31.1
| |