From: Steven Rostedt <rostedt@goodmis.org>
To: "Patrik Hägglund" <patrik.hagglund@bredband.net>
Cc: linux-kernel@vger.kernel.org, Chris Friesen <cfriesen@nortel.com>
Subject: Re: SCHED_RR/SCHED_FIFO and kernel threads?
Date: Fri, 17 Jun 2005 08:37:52 -0400 [thread overview]
Message-ID: <1119011872.4846.12.camel@localhost.localdomain> (raw)
In-Reply-To: <42B26FF8.6090505@bredband.net>
On Fri, 2005-06-17 at 08:38 +0200, Patrik Hägglund wrote:
> Don't you get the problem with priority inversion? I.e., if you have two
> processes, P1 and P2, scheduled with SCHED_FIFO, where P1 has higer
> priority than P2. Now, if P1 gets blocked and needs some kernel thread
> to execute to get unblocked, then P2 is scheduled before the kernel
> thread, and can execute without any time limit.
Yep, that could happen.
> That is, you should be much better off if the kernel threads has a
> _high_ priority. Then the execution progress can only be blocked by
> kernel threads, not by user space threads and processes. Or have I
> missed something?
Still have that problem with priority inversion. Kernel threads share
date structures with user processes (when they are in kernel mode) and
that kernel thread that is needed may get blocked on a process that is
lower in priority than the two mentioned above.
>
> (Besides that, as I see it, SCHED_RR/SCHED_FIFO are scheduling
> abstractions on their own, not necessarily connected to "low latency "
> or "realtime".)
Only in the vanilla kernel. See Ingo's RT work. It handles priority
inversion and SCHED_RR/SCHED_FIFO are actually connected to "low
latency" and "realtime".
http://people.redhat.com/mingo/realtime-preempt/
-- Steve
next prev parent reply other threads:[~2005-06-17 13:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-16 15:25 SCHED_RR/SCHED_FIFO and kernel threads? Patrik Hägglund
2005-06-16 15:48 ` Chris Friesen
2005-06-17 6:38 ` Patrik Hägglund
2005-06-17 12:37 ` Steven Rostedt [this message]
2005-06-18 8:14 ` Patrik Hägglund
2005-06-21 22:15 ` Patrik Hägglund
2005-06-21 22:18 ` Patrik Hägglund
2005-06-22 0:13 ` Lee Revell
2005-06-16 16:01 ` Lee Revell
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=1119011872.4846.12.camel@localhost.localdomain \
--to=rostedt@goodmis.org \
--cc=cfriesen@nortel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=patrik.hagglund@bredband.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