提交 6ca59b5c 编写于 作者: M Mel Gorman 提交者: Zheng Zengkai

sched/fair: Remove select_idle_smt()

mainline inclusion
from mainline-5.12-rc1
commit 6cd56ef1
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I41A4K
CVE: NA
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6cd56ef1df399a004f90ecb682427f9964969fc9

---------------------------

In order to make the next patch more readable, and to quantify the
actual effectiveness of this pass, start by removing it.
Signed-off-by: NMel Gorman <mgorman@techsingularity.net>
Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: NIngo Molnar <mingo@kernel.org>
Reviewed-by: NVincent Guittot <vincent.guittot@linaro.org>
Link: https://lkml.kernel.org/r/20210125085909.4600-4-mgorman@techsingularity.netSigned-off-by: NZheng Zucheng <zhengzucheng@huawei.com>
Reviewed-by: NChen Hui <judy.chenhui@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 dc97200e
...@@ -6126,27 +6126,6 @@ static int select_idle_core(struct task_struct *p, struct sched_domain *sd, int ...@@ -6126,27 +6126,6 @@ static int select_idle_core(struct task_struct *p, struct sched_domain *sd, int
return -1; return -1;
} }
/*
* Scan the local SMT mask for idle CPUs.
*/
static int select_idle_smt(struct task_struct *p, struct sched_domain *sd, int target)
{
int cpu;
if (!static_branch_likely(&sched_smt_present))
return -1;
for_each_cpu(cpu, cpu_smt_mask(target)) {
if (!cpumask_test_cpu(cpu, p->cpus_ptr) ||
!cpumask_test_cpu(cpu, sched_domain_span(sd)))
continue;
if (available_idle_cpu(cpu) || sched_idle_cpu(cpu))
return cpu;
}
return -1;
}
#else /* CONFIG_SCHED_SMT */ #else /* CONFIG_SCHED_SMT */
static inline int select_idle_core(struct task_struct *p, struct sched_domain *sd, int target) static inline int select_idle_core(struct task_struct *p, struct sched_domain *sd, int target)
...@@ -6154,11 +6133,6 @@ static inline int select_idle_core(struct task_struct *p, struct sched_domain *s ...@@ -6154,11 +6133,6 @@ static inline int select_idle_core(struct task_struct *p, struct sched_domain *s
return -1; return -1;
} }
static inline int select_idle_smt(struct task_struct *p, struct sched_domain *sd, int target)
{
return -1;
}
#endif /* CONFIG_SCHED_SMT */ #endif /* CONFIG_SCHED_SMT */
/* /*
...@@ -6348,10 +6322,6 @@ static int select_idle_sibling(struct task_struct *p, int prev, int target) ...@@ -6348,10 +6322,6 @@ static int select_idle_sibling(struct task_struct *p, int prev, int target)
if ((unsigned)i < nr_cpumask_bits) if ((unsigned)i < nr_cpumask_bits)
return i; return i;
i = select_idle_smt(p, sd, target);
if ((unsigned)i < nr_cpumask_bits)
return i;
return target; return target;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册