Skip to content

Commit

Permalink
sched: rt-group: fix RR buglet
Browse files Browse the repository at this point in the history
In tick_task_rt() we first call update_curr_rt() which can dequeue a runqueue
due to it running out of runtime, and then we try to requeue it, of it also
having exhausted its RR quota. Obviously requeueing something that is no longer
on the runqueue will not have the expected result.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Tested-by: Daniel K. <dk@uw.no>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Jun 19, 2008
1 parent ad2a3f1 commit 15a8641
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion kernel/sched_rt.c
Original file line number Diff line number Diff line change
Expand Up @@ -549,8 +549,10 @@ static
void requeue_rt_entity(struct rt_rq *rt_rq, struct sched_rt_entity *rt_se)
{
struct rt_prio_array *array = &rt_rq->active;
struct list_head *queue = array->queue + rt_se_prio(rt_se);

list_move_tail(&rt_se->run_list, array->queue + rt_se_prio(rt_se));
if (on_rt_rq(rt_se))
list_move_tail(&rt_se->run_list, queue);
}

static void requeue_task_rt(struct rq *rq, struct task_struct *p)
Expand Down

0 comments on commit 15a8641

Please sign in to comment.