sched: window-stats: Do not account wait time

Task load statistics are used for two purposes : cpu frequency
management and placement. Task's load can't be accurately judged by
its wait time. For ex: a task could have waited for 10ms and when given
opportunity to run, could just execute for 1ms. Accounting for 11ms as
task's demand could be over-stating its needs in this example. For
now, remove wait time from task demand and instead let task load be
derived from its actual exec time. This may need to become a tunable
feature.

Change-Id: I47e94c444c6b44c3b0810347287d50f1ee685038
Signed-off-by: Srivatsa Vaddagiri <vatsa@codeaurora.org>
This commit is contained in:
Srivatsa Vaddagiri 2014-04-29 08:56:13 -07:00 committed by David Keitel
parent 8319c3a580
commit 490b1d23cc

View file

@ -1532,7 +1532,7 @@ void set_task_cpu(struct task_struct *p, unsigned int new_cpu)
perf_event_task_migrate(p); perf_event_task_migrate(p);
if (p->state == TASK_RUNNING) if (p->state == TASK_RUNNING)
update_task_ravg(p, task_rq(p), 1); update_task_ravg(p, task_rq(p), 0);
} }
__set_task_cpu(p, new_cpu); __set_task_cpu(p, new_cpu);
@ -3321,7 +3321,7 @@ pick_next_task(struct rq *rq, struct task_struct *prev)
if (unlikely(!p)) if (unlikely(!p))
p = idle_sched_class.pick_next_task(rq, prev); p = idle_sched_class.pick_next_task(rq, prev);
update_task_ravg(p, rq, 1); update_task_ravg(p, rq, 0);
return p; return p;
} }
@ -3331,7 +3331,7 @@ again:
if (p) { if (p) {
if (unlikely(p == RETRY_TASK)) if (unlikely(p == RETRY_TASK))
goto again; goto again;
update_task_ravg(p, rq, 1); update_task_ravg(p, rq, 0);
return p; return p;
} }
} }