Skip to content

Commit

Permalink
sched: rt-group: reduce rescheduling
Browse files Browse the repository at this point in the history
Only reschedule if the new group has a higher prio task.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Jan 25, 2008
1 parent 37bb6cb commit 1020387
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion kernel/sched_rt.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,11 @@ static void sched_rt_ratio_enqueue(struct rt_rq *rt_rq)
struct sched_rt_entity *rt_se = rt_rq->rt_se;

if (rt_se && !on_rt_rq(rt_se) && rt_rq->rt_nr_running) {
struct task_struct *curr = rq_of_rt_rq(rt_rq)->curr;

enqueue_rt_entity(rt_se);
resched_task(rq_of_rt_rq(rt_rq)->curr);
if (rt_rq->highest_prio < curr->prio)
resched_task(curr);
}
}

Expand Down

0 comments on commit 1020387

Please sign in to comment.