diff options
| author | Srivatsa Vaddagiri <vatsa@codeaurora.org> | 2014-07-28 01:37:05 -0700 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 20:00:09 -0700 |
| commit | 69fec0486fff06888209f4324bdd4c10bda8abd8 (patch) | |
| tree | ed221947afd83dc67bdc53952bc859ef2f710c1e /kernel/sched | |
| parent | 8f8c8db1c5f49f90efa9e2f7656ead216a7643cb (diff) | |
sched: Extend ftrace event to record boost and reason code
Add a new ftrace event to record changes to boost setting. Also extend
sched_task_load() ftrace event to record boost setting and reason code
passed to select_best_cpu(). This will be useful for debug purpose.
Change-Id: Idac72f86d954472abe9f88a8db184343b7730287
Signed-off-by: Srivatsa Vaddagiri <vatsa@codeaurora.org>
Diffstat (limited to 'kernel/sched')
| -rw-r--r-- | kernel/sched/fair.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 436efe2a1f49..e8aba1a21779 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -2799,6 +2799,7 @@ int sched_set_boost(int enable) if (!old_refcount && boost_refcount) boost_kick_cpus(); + trace_sched_set_boost(boost_refcount); spin_unlock_irqrestore(&boost_lock, flags); return ret; @@ -3064,10 +3065,11 @@ static int select_best_cpu(struct task_struct *p, int target, int reason) int cpu_cost, min_cost = INT_MAX; u64 load, min_load = ULLONG_MAX, min_fallback_load = ULLONG_MAX; int small_task = is_small_task(p); + int boost = sched_boost(); - trace_sched_task_load(p); + trace_sched_task_load(p, boost, reason); - if (small_task && !sched_boost()) { + if (small_task && !boost) { best_cpu = best_small_task_cpu(p); goto done; } |
