lkml.org 
[lkml]   [2008]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
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;
}

\
 
 \ /
  Last update: 2008-10-11 09:07    [W:0.056 / U:3.720 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site