diff options
author | Morten Rasmussen <Morten.Rasmussen@arm.com> | 2012-06-29 16:46:34 +0100 |
---|---|---|
committer | Jon Medhurst <tixy@linaro.org> | 2012-07-16 15:01:37 +0100 |
commit | 14b5723573f8626b413e48948aa12cb750a56902 (patch) | |
tree | 4bc24fec6e4fa78797aca436b55d24b00028feaf | |
parent | 3e7a2e9e4d57096bb7d2ed8bc59e1bdcdb0323f9 (diff) | |
download | vexpress-a9-14b5723573f8626b413e48948aa12cb750a56902.tar.gz |
sched: entity load-tracking load_avg_ratio
load_avg_contrib includes task load.weight and therefore not the
pure tracked load of the task. This patch adds load_avg_ratio, which
does not include the task load.weight.
Signed-off-by: Morten Rasmussen <Morten.Rasmussen@arm.com>
-rw-r--r-- | include/linux/sched.h | 1 | ||||
-rw-r--r-- | kernel/sched/fair.c | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 2b22d81c6b1..c30a799227d 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -1140,6 +1140,7 @@ struct sched_avg { u64 last_runnable_update; s64 decay_count; unsigned long load_avg_contrib; + unsigned long load_avg_ratio; u32 usage_avg_sum; }; diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 0b7a9f5b82c..846438e3b42 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -1175,7 +1175,8 @@ static inline void __update_task_entity_contrib(struct sched_entity *se) trace_sched_task_load_contrib(task_of(se), se->avg.load_avg_contrib); contrib = se->avg.runnable_avg_sum * scale_load_down(1024); contrib /= (se->avg.runnable_avg_period + 1); - trace_sched_task_runnable_ratio(task_of(se), scale_load(contrib)); + se->avg.load_avg_ratio = scale_load(contrib); + trace_sched_task_runnable_ratio(task_of(se), se->avg.load_avg_ratio); contrib = se->avg.usage_avg_sum * scale_load_down(1024); contrib /= (se->avg.runnable_avg_period + 1); trace_sched_task_usage_ratio(task_of(se), scale_load(contrib)); |