aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMorten Rasmussen <morten.rasmussen@arm.com>2012-10-12 15:25:02 +0100
committerViresh Kumar <viresh.kumar@linaro.org>2013-02-11 10:38:24 +0530
commitb9ab7b924cb36d29ab0d088707eca248bf5ffc53 (patch)
treefe33b8e03b34f231a9c812a80970ff52d0515784
parentef13a66276f5eed015eb3ca551915f9b328c42f6 (diff)
downloadvexpress-lsk-b9ab7b924cb36d29ab0d088707eca248bf5ffc53.tar.gz
sched: Only down migrate low priority tasks if allowed by affinity mask
Adds an extra check intersection of the task affinity mask and the slower hmp_domain cpumask before down migrating low priority tasks. Signed-off-by: Morten Rasmussen <morten.rasmussen@arm.com>
-rw-r--r--kernel/sched/fair.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index a7ee6227b70..9d9bab5919b 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -5895,8 +5895,11 @@ static unsigned int hmp_down_migration(int cpu, struct sched_entity *se)
#ifdef CONFIG_SCHED_HMP_PRIO_FILTER
/* Filter by task priority */
- if (p->prio >= hmp_up_prio)
+ if ((p->prio >= hmp_up_prio) &&
+ cpumask_intersects(&hmp_slower_domain(cpu)->cpus,
+ tsk_cpus_allowed(p))) {
return 1;
+ }
#endif
/* Let the task load settle before doing another down migration */