Re: [PATCH] sched: fair scheduler should not resched rt tasks
From: Steven Rostedt
Date: Sat Oct 11 2008 - 09:55:49 EST
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 <a.p.zijlstra@xxxxxxxxx>
Acked-by: Steven Rostedt <srostedt@xxxxxxxxxx>
--
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/