]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - kernel/sched_rt.c
sched: group scheduler, fix fairness of cpu bandwidth allocation for task groups
[linux-2.6-omap-h63xx.git] / kernel / sched_rt.c
index 8abd752a0ebd9fa9d9bb8f9c61100923d5df17ac..cefcd5105146177ea24cdd9ae0577b784a3b7ad1 100644 (file)
@@ -23,6 +23,7 @@ static void update_curr_rt(struct rq *rq)
 
        curr->se.sum_exec_runtime += delta_exec;
        curr->se.exec_start = rq->clock;
+       cpuacct_charge(curr, delta_exec);
 }
 
 static void enqueue_task_rt(struct rq *rq, struct task_struct *p, int wakeup)
@@ -31,6 +32,7 @@ static void enqueue_task_rt(struct rq *rq, struct task_struct *p, int wakeup)
 
        list_add_tail(&p->run_list, array->queue + p->prio);
        __set_bit(p->prio, array->bitmap);
+       inc_cpu_load(rq, p->se.load.weight);
 }
 
 /*
@@ -45,6 +47,7 @@ static void dequeue_task_rt(struct rq *rq, struct task_struct *p, int sleep)
        list_del(&p->run_list);
        if (list_empty(array->queue + p->prio))
                __clear_bit(p->prio, array->bitmap);
+       dec_cpu_load(rq, p->se.load.weight);
 }
 
 /*
@@ -207,6 +210,8 @@ move_one_task_rt(struct rq *this_rq, int this_cpu, struct rq *busiest,
 
 static void task_tick_rt(struct rq *rq, struct task_struct *p)
 {
+       update_curr_rt(rq);
+
        /*
         * RR tasks need a special form of timeslice management.
         * FIFO tasks have no timeslices.