From: Morten Rasmussen Date: Fri, 12 Oct 2012 14:25:02 +0000 (+0100) Subject: sched: Only down migrate low priority tasks if allowed by affinity mask X-Git-Tag: firefly_0821_release~3680^2~16^2^2~67 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=eeebbf595c8dcd6392537c4d13b8cda78001f4e5;p=firefly-linux-kernel-4.4.55.git 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 --- diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index fe2408f25e24..474dc61b3afe 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -5918,8 +5918,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 */