sched: rt: account the cpu time during the tick
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Thu, 20 Dec 2007 14:01:17 +0000 (15:01 +0100)
committerIngo Molnar <mingo@elte.hu>
Thu, 20 Dec 2007 14:01:17 +0000 (15:01 +0100)
Realtime tasks would not account their runtime during ticks. Which would lead
to:

        struct sched_param param = { .sched_priority = 10 };
        pthread_setschedparam(pthread_self(), SCHED_FIFO, &param);

while (1) ;

Not showing up in top.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
kernel/sched_rt.c

index ee9c8b6529e9bad0c0b09708713c861e13363675..9ba3daa03475cfeed642eeaacbd21f5b3aa118eb 100644 (file)
@@ -208,6 +208,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.