From: Jon Medhurst (Tixy) Date: Fri, 2 Aug 2013 17:45:33 +0000 (+0100) Subject: HMP: Check the system has little cpus before forcing rt tasks onto them X-Git-Tag: accepted/tizen/common/20141203.182822~98^2~49 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2ff9fbe83181eeef6b7f203802e8ea2589f29604;p=platform%2Fkernel%2Flinux-arm64.git 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 Signed-off-by: Mark Brown --- diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 87b021e..84367d6 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -3185,8 +3185,9 @@ static void __setscheduler(struct rq *rq, struct task_struct *p, else 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