diff options
author | Morten Rasmussen <Morten.Rasmussen@arm.com> | 2012-09-14 14:38:16 +0100 |
---|---|---|
committer | Viresh Kumar <viresh.kumar@linaro.org> | 2012-11-14 09:22:08 +0530 |
commit | 24b39ca88ea29cac0f9c173bed87b9271be65d9e (patch) | |
tree | 96bac88346e7fb0fe854752e09b09ad2ef6c3f34 /kernel | |
parent | 5c9c3c746001b396dbda8375568416697c79e602 (diff) |
sched: Add HMP task migration ftrace event
Adds ftrace event for tracing task migrations using HMP
optimized scheduling.
Signed-off-by: Morten Rasmussen <Morten.Rasmussen@arm.com>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/sched/fair.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 8c3ecad071b..f1d99c2398a 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -3329,10 +3329,16 @@ unlock: rcu_read_unlock(); #ifdef CONFIG_SCHED_HMP - if (hmp_up_migration(prev_cpu, &p->se)) - return hmp_select_faster_cpu(p, prev_cpu); - if (hmp_down_migration(prev_cpu, &p->se)) - return hmp_select_slower_cpu(p, prev_cpu); + if (hmp_up_migration(prev_cpu, &p->se)) { + new_cpu = hmp_select_faster_cpu(p, prev_cpu); + trace_sched_hmp_migrate(p, new_cpu, 0); + return new_cpu; + } + if (hmp_down_migration(prev_cpu, &p->se)) { + new_cpu = hmp_select_slower_cpu(p, prev_cpu); + trace_sched_hmp_migrate(p, new_cpu, 0); + return new_cpu; + } /* Make sure that the task stays in its previous hmp domain */ if (!cpumask_test_cpu(new_cpu, &hmp_cpu_domain(prev_cpu)->cpus)) return prev_cpu; @@ -5823,6 +5829,7 @@ static void hmp_force_up_migration(int this_cpu) target->push_cpu = hmp_select_faster_cpu(p, cpu); target->migrate_task = p; force = 1; + trace_sched_hmp_migrate(p, target->push_cpu, 1); } } raw_spin_unlock_irqrestore(&target->lock, flags); |