Messages in this thread Patch in this message | | | Date | Sat, 11 Oct 2008 03:01:50 -0400 (EDT) | From | Steven Rostedt <> | Subject | [PATCH] sched: fair scheduler should not resched rt tasks |
| |
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@redhat.com> --- 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; }
| |