mirror of
https://github.com/armbian/linux.git
synced 2026-01-06 10:13:00 -08:00
HMP: Check the system has little cpus before forcing rt tasks onto them
It is sometimes desirable to run a kernel with HMP scheduling enabled on a system which is not big.LITTLE, e.g. when building a multi-platform kernel, or when testing a big.LITTLE system with one cluster disabled. We should therefore allow for the situation where is no little domain. Signed-off-by: Jon Medhurst <tixy@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
This commit is contained in:
committed by
Jon Medhurst
parent
4ab2679351
commit
0d5ddd14a8
@@ -3841,8 +3841,9 @@ __setscheduler(struct rq *rq, struct task_struct *p, int policy, int prio)
|
||||
if (rt_prio(p->prio)) {
|
||||
p->sched_class = &rt_sched_class;
|
||||
#ifdef CONFIG_SCHED_HMP
|
||||
if (cpumask_equal(&p->cpus_allowed, cpu_all_mask))
|
||||
do_set_cpus_allowed(p, &hmp_slow_cpu_mask);
|
||||
if (!cpumask_empty(&hmp_slow_cpu_mask))
|
||||
if (cpumask_equal(&p->cpus_allowed, cpu_all_mask))
|
||||
do_set_cpus_allowed(p, &hmp_slow_cpu_mask);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user