Message ID | 20200226164118.6405-2-valentin.schneider@arm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | sched, arm64: enable CONFIG_SCHED_SMT for arm64 | expand |
On Wednesday 26 Feb 2020 at 16:41:17 (+0000), Valentin Schneider wrote: > EAS already requires asymmetric CPU capacities to be enabled, and mixing > this with SMT is an aberration, but better be safe than sorry. > > Signed-off-by: Valentin Schneider <valentin.schneider@arm.com> Acked-by: Quentin Perret <qperret@google.com> Thanks, Quentin > --- > kernel/sched/topology.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c > index 00911884b7e7..76cd0a370b9a 100644 > --- a/kernel/sched/topology.c > +++ b/kernel/sched/topology.c > @@ -360,6 +360,10 @@ static bool build_perf_domains(const struct cpumask *cpu_map) > goto free; > } > > + /* EAS definitely does *not* handle SMT */ > + if (sched_smt_active()) > + goto free; > + > for_each_cpu(i, cpu_map) { > /* Skip already covered CPUs. */ > if (find_pd(pd, i)) > -- > 2.24.0 >
On 27.02.20 13:00, Quentin Perret wrote: > On Wednesday 26 Feb 2020 at 16:41:17 (+0000), Valentin Schneider wrote: >> EAS already requires asymmetric CPU capacities to be enabled, and mixing >> this with SMT is an aberration, but better be safe than sorry. >> >> Signed-off-by: Valentin Schneider <valentin.schneider@arm.com> > > Acked-by: Quentin Perret <qperret@google.com> > > Thanks, > Quentin > >> --- >> kernel/sched/topology.c | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c >> index 00911884b7e7..76cd0a370b9a 100644 >> --- a/kernel/sched/topology.c >> +++ b/kernel/sched/topology.c >> @@ -360,6 +360,10 @@ static bool build_perf_domains(const struct cpumask *cpu_map) >> goto free; >> } >> >> + /* EAS definitely does *not* handle SMT */ >> + if (sched_smt_active()) Can you add a pr_warn() and use the current comment as the warning message? Since we have one for !Asym CPU capacity and !schedutil. >> + goto free; >> + [...] There is this 'EAS can be used ...' list of currently 4 items in the build_perf_domains() function header. You could include 'X. No SMT support' there. ;-)
On Thu, Feb 27 2020, Dietmar Eggemann wrote: >>> + /* EAS definitely does *not* handle SMT */ >>> + if (sched_smt_active()) > > Can you add a pr_warn() and use the current comment as the warning > message? Since we have one for !Asym CPU capacity and !schedutil. > >>> + goto free; >>> + > > [...] > > There is this 'EAS can be used ...' list of currently 4 items in the > build_perf_domains() function header. You could include 'X. No SMT > support' there. > ;-) Right, the rst doc says "EAS on SMT is not supported" but I think that can be interpreted as "EAS on !asym SMT". I'll add the warning and update the comment.
diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c index 00911884b7e7..76cd0a370b9a 100644 --- a/kernel/sched/topology.c +++ b/kernel/sched/topology.c @@ -360,6 +360,10 @@ static bool build_perf_domains(const struct cpumask *cpu_map) goto free; } + /* EAS definitely does *not* handle SMT */ + if (sched_smt_active()) + goto free; + for_each_cpu(i, cpu_map) { /* Skip already covered CPUs. */ if (find_pd(pd, i))
EAS already requires asymmetric CPU capacities to be enabled, and mixing this with SMT is an aberration, but better be safe than sorry. Signed-off-by: Valentin Schneider <valentin.schneider@arm.com> --- kernel/sched/topology.c | 4 ++++ 1 file changed, 4 insertions(+)