Skip to content

Commit

Permalink
sched: rt: account the cpu time during the tick
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Dec 20, 2007
1 parent fbdcf18 commit 67e2be0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kernel/sched_rt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 67e2be0

Please sign in to comment.