sched/deadline: Add SCHED_DEADLINE avg_update accounting
authorDario Faggioli <raistlin@linux.it>
Thu, 7 Nov 2013 13:43:39 +0000 (14:43 +0100)
committerIngo Molnar <mingo@kernel.org>
Mon, 13 Jan 2014 12:41:08 +0000 (13:41 +0100)
Make the core scheduler and load balancer aware of the load
produced by -deadline tasks, by updating the moving average
like for sched_rt.

Signed-off-by: Dario Faggioli <raistlin@linux.it>
Signed-off-by: Juri Lelli <juri.lelli@gmail.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1383831828-15501-6-git-send-email-juri.lelli@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/sched/deadline.c

index fcc02c9ca16bdc5a2aae692f7e5f70c5cc325397..21f58d26113484562ad3753c266bf1e1b2269b67 100644 (file)
@@ -564,6 +564,8 @@ static void update_curr_dl(struct rq *rq)
        curr->se.exec_start = rq_clock_task(rq);
        cpuacct_charge(curr, delta_exec);
 
+       sched_rt_avg_update(rq, delta_exec);
+
        dl_se->runtime -= delta_exec;
        if (dl_runtime_exceeded(rq, dl_se)) {
                __dequeue_task_dl(rq, curr, 0);