lkml.org 
[lkml]   [2004]   [May]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: tvtime and the Linux 2.6 scheduler

* Billy Biggs <vektor@dumbterm.net> wrote:

> for(;;)
> 9 ms : process frame
> 4 ms : draw frame
> 3 ms : wait until next field time using /dev/rtc
> 9 ms : process frame
> 4 ms : draw frame
> 3 ms : block on /dev/video0 for next frame
> -----
> 33 ms : time per NTSC frame
>
> The theory is that Linux classifies this as a CPU hog regardless of
> its priority, and preempts tvtime with other processes. [...]

this would indicate a pretty broken scheduler. To prove (or exclude)
this possibility, could you apply the attached debugging patch? The
patch checks whether we ever switch away from a still running (and
hence, on-runqueue) RT task to a non-RT task.

(NOTE: dont run this patch on an SMP kernel, the debugging message will
deadlock there due to spinlock recursion.)

Ingo

--- linux/kernel/sched.c.orig
+++ linux/kernel/sched.c
@@ -2279,6 +2279,7 @@ switch_tasks:
prev->timestamp = now;

if (likely(prev != next)) {
+ WARN_ON(rt_task(prev) && (prev->state == TASK_RUNNING) && !rt_task(next));
next->timestamp = now;
rq->nr_switches++;
rq->curr = next;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 14:03    [W:0.082 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site