[PATCH] sched: fair scheduler should not resched rt tasks

From: Steven Rostedt
Date: Sat Oct 11 2008 - 03:03:54 EST



Using ftrace, I noticed latencies in real-time tasks where they were
needlessly calling schedule due to sched_fair sending out time slices.

This patch prevents a call to resched_task by the sched fair class if
the task it wants to reschedule is an rt task.

Signed-off-by: Steven Rostedt <srostedt@xxxxxxxxxx>
---
kernel/sched_fair.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-compile.git/kernel/sched_fair.c
===================================================================
--- linux-compile.git.orig/kernel/sched_fair.c 2008-10-11 02:54:01.000000000 -0400
+++ linux-compile.git/kernel/sched_fair.c 2008-10-11 02:55:52.000000000 -0400
@@ -889,7 +889,7 @@ static void hrtick_start_fair(struct rq
s64 delta = slice - ran;

if (delta < 0) {
- if (rq->curr == p)
+ if (rq->curr == p && !rt_task(p))
resched_task(p);
return;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/