diff options
author | Chris Redpath <chris.redpath@arm.com> | 2013-08-19 15:06:23 +0100 |
---|---|---|
committer | Jon Medhurst <tixy@linaro.org> | 2013-08-20 17:19:09 +0100 |
commit | 4f887f54ff7e29026fd6a932abb103949ca639a8 (patch) | |
tree | c3bdd8cb5d56d48089e1a78cb8fa0c7be60fa26b | |
parent | c962f2c4976d2a2a792306f7677c856d701bf6a1 (diff) |
HMP: Update migration timer when we fork-migratetracking-big-little-mp-llct-20130829.0tracking-big-little-mp-llct-20130820.0
Prevents fork-migration adversely interacting with normal
migration (i.e. runqueues containing forked tasks being
selected as migration targets when there is a better
choice available)
Signed-off-by: Chris Redpath <chris.redpath@arm.com>
Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>
Signed-off-by: Jon Medhurst <tixy@linaro.org>
-rw-r--r-- | kernel/sched/fair.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index b0d88752583b..b9be9c9713d0 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -4126,18 +4126,26 @@ select_task_rq_fair(struct task_struct *p, int sd_flag, int wake_flags) if(hmp_cpu_is_fastest(prev_cpu)) { struct hmp_domain *hmpdom = list_entry(&hmp_cpu_domain(prev_cpu)->hmp_domains, struct hmp_domain, hmp_domains); __always_unused int lowest_ratio = hmp_domain_min_load(hmpdom, &new_cpu); - if(new_cpu != NR_CPUS && cpumask_test_cpu(new_cpu,tsk_cpus_allowed(p))) + if (new_cpu != NR_CPUS && + cpumask_test_cpu(new_cpu, + tsk_cpus_allowed(p))) { + hmp_next_up_delay(&p->se, new_cpu); return new_cpu; - else { - new_cpu = cpumask_any_and(&hmp_faster_domain(cpu)->cpus, + } else { + new_cpu = cpumask_any_and( + &hmp_faster_domain(cpu)->cpus, tsk_cpus_allowed(p)); - if(new_cpu < nr_cpu_ids) + if (new_cpu < nr_cpu_ids) { + hmp_next_up_delay(&p->se, new_cpu); return new_cpu; + } } } else { new_cpu = hmp_select_faster_cpu(p, prev_cpu); - if (new_cpu != NR_CPUS) + if (new_cpu != NR_CPUS) { + hmp_next_up_delay(&p->se, new_cpu); return new_cpu; + } } } #endif |