From: Peter Zijlstra Date: Fri, 25 Jan 2008 20:08:32 +0000 (+0100) Subject: sched: rt-group: reduce rescheduling X-Git-Tag: v2.6.25-rc1~1237^2~18 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1020387f5f3b52929b387103cf976321981f8e26;p=linux-2.6 sched: rt-group: reduce rescheduling Only reschedule if the new group has a higher prio task. Signed-off-by: Peter Zijlstra Signed-off-by: Ingo Molnar --- diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c index 8bfdb3f8a5..f1f215db3b 100644 --- a/kernel/sched_rt.c +++ b/kernel/sched_rt.c @@ -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); } }