From: Ingo Molnar <mingo@elte.hu>
To: Billy Biggs <vektor@dumbterm.net>
Cc: Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: tvtime and the Linux 2.6 scheduler
Date: Mon, 24 May 2004 11:20:57 +0200 [thread overview]
Message-ID: <20040524092057.GA26715@elte.hu> (raw)
In-Reply-To: <20040523154859.GC22399@dumbterm.net>
* 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;
next prev parent reply other threads:[~2004-05-24 7:21 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-23 15:48 tvtime and the Linux 2.6 scheduler Billy Biggs
2004-05-23 16:20 ` Jose Luis Domingo Lopez
2004-05-23 16:54 ` Con Kolivas
2004-05-23 17:20 ` Billy Biggs
2004-05-23 21:03 ` Oswald Buddenhagen
2004-05-24 8:43 ` Ingo Molnar
2004-05-24 6:58 ` Nick Piggin
2004-05-24 9:12 ` Ingo Molnar
2004-05-24 7:14 ` Nick Piggin
2004-05-24 9:34 ` Ingo Molnar
2004-05-23 22:49 ` szonyi calin
2004-05-24 19:38 ` Bill Davidsen
2004-05-25 8:49 ` Tobias Diedrich
2004-05-24 9:20 ` Ingo Molnar [this message]
2004-05-24 11:45 ` Oswald Buddenhagen
2004-05-27 11:35 ` Redeeman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040524092057.GA26715@elte.hu \
--to=mingo@elte.hu \
--cc=linux-kernel@vger.kernel.org \
--cc=vektor@dumbterm.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox