[lkml]   [2008]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] sched: fair scheduler should not resched rt tasks

On Sat, 11 Oct 2008, Peter Zijlstra wrote:

> On Sat, 2008-10-11 at 03:01 -0400, Steven Rostedt wrote:
> > 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.
> Right, thats not a good thing, however this patch looks wrong, we should
> never call hrtick_start_fair() on a rt task to begin with.

Great! I don't care which way we fix this. This was making noticeable
latencies against rt tasks.

> The way I can see that happening is through enqueue/dequeue_task_fair()
> where we want to re-programm the hrtick because nr_running changes (and
> thus the current tasks desired runtime).

My original patch was more like this one, but I wasn't sure if I was
skipping any calculations that were assumed to be made. Thus, I wrote the
bare minimum and sent it out CC'ing the experts. Looks like my plan worked

-- Steve

> Signed-off-by: Peter Zijlstra <>

Acked-by: Steven Rostedt <>

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