From: Bill Huey (hui) <bhuey@lnxw.com>
To: Mark_H_Johnson@raytheon.com
Cc: Ingo Molnar <mingo@elte.hu>, Andrew Morton <akpm@osdl.org>,
Bill Huey <bhuey@lnxw.com>, Dipankar Sarma <dipankar@in.ibm.com>,
Adam Heath <doogie@debian.org>,
Daniel Walker <dwalker@mvista.com>, "K.R. Foley" <kr@cybsft.com>,
linux-kernel@vger.kernel.org,
Lorenzo Allegrucci <l_allegrucci@yahoo.it>,
Lee Revell <rlrevell@joe-job.com>,
Rui Nuno Capela <rncbc@rncbc.org>
Subject: Re: [patch] Real-Time Preemption, -VP-2.6.9-rc4-mm1-U1
Date: Thu, 14 Oct 2004 12:46:47 -0700 [thread overview]
Message-ID: <20041014194647.GA17579@nietzsche.lynx.com> (raw)
In-Reply-To: <OFF6785669.51B69427-ON86256F2D.0066DF1F@raytheon.com>
On Thu, Oct 14, 2004 at 02:13:15PM -0500, Mark_H_Johnson@raytheon.com wrote:
...
> be some real time value so that nice -20 jobs won't bother them either.
> A possibility that comes to mind is to schedule IRQ's at a range higher
> than
> available to all real time application tasks. I'll mention another
> possibility below as well.
The interrupt priority range probably needs to be increased to accommodate the
increased design demand of RT applications.
> In the systems I have to deal with, I do not have a clear criteria
> to set priorities of interrupts relative to each other. For example, I
> have a real time simulation system using the following devices:
> - occasional disk access to simulate disk I/O
> - real time network traffic
> - real time delivery of interrupts from a PCI timer card and APIC timers
> - real time interrupts from a shared memory interface
> The priorities of real time tasks are basically assigned based on the
> rate of execution. 80 Hz tasks run at a higher priority than 60 Hz, 60 Hz >
> 40 Hz, and so on. A number of tasks can access each device.
Crank it higher 120hz and see what kind of jitter your getting. Hit
something with high memory load, large, mmap images, swap and friends.
> It would be "better" if the priority of the hardware interrupts somehow
> inherited the priority (absolute or relative to other IRQ's) of the task
> making the request. So in that way, a 40 Hz task making a network transfer
> would somehow boost the priority of the network interface until that
> transfer was complete. It would also be good if the queue of pending
> transfers was reordered by RT priority, but I don't see that as an easy
> thing to implement currently in Linux (but I can ask... :-) ).
That's an RT app slippery slope and it should be handled by some kind of
in-kernel or kernel locking aware facilties. The reason why Linux is
ideal for RTOS usage is directly related to all of the SMP work that's
been done over the years. Contention, therefore the need for priority
inheritance, is evil. If you need that kind of functionality, then you
might be good to consider the scheduling indeterminancy of the lock chain
being aquired and it should have little or no overlap with things like
irq-threads. The system should be decoupled (queues, etc...) if possible
and you shouldn't abuse priority inheritance. The use of priority
inheritance should be considered a kind lock contention overload and
the algorithms it bounds should be optimized. In your case, the network
stack might need to be broken up to provide the kind of granularity
and control need to attach on a socket per process/thread basis, just
like Jeffery Hsu's lockless network stack effort in DragonFly BSD.
Long priority inheritance chains is an app-level indeterminacy nightmare
and either indicates an improperly written application or nasty SMP
contention issue. That's how I see it.
> Needless to say, if you implemented priority inheritance, when the 40 Hz
> task is not doing network transfers, I would just as soon prefer that
> other network operations (say from a 2 Hz tasks) does not get a priority
> boost above a 20 Hz task accessing another device.
bill
next prev parent reply other threads:[~2004-10-14 19:53 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-14 19:13 [patch] Real-Time Preemption, -VP-2.6.9-rc4-mm1-U1 Mark_H_Johnson
2004-10-14 19:46 ` Bill Huey [this message]
2004-10-14 19:48 ` Ingo Molnar
2004-10-14 21:52 ` Esben Nielsen
2004-10-15 14:52 ` Timothy Miller
-- strict thread matches above, loose matches on Subject: below --
2004-11-13 23:02 William Wolf
2004-10-14 21:08 ` Lee Revell
2004-10-14 22:26 ` William Wolf
2004-10-14 22:24 Mark_H_Johnson
2004-10-14 17:06 Mark_H_Johnson
2004-10-14 18:24 ` Ingo Molnar
2004-10-14 19:02 ` Ingo Molnar
2004-10-14 20:26 ` Bill Huey
2004-10-14 20:32 ` Bill Huey
2004-10-11 18:23 [patch] CONFIG_PREEMPT_REALTIME, 'Fully Preemptible Kernel', VP-2.6.9-rc4-mm1-T4 Mark_H_Johnson
2004-10-11 21:59 ` [patch] VP-2.6.9-rc4-mm1-T5 Ingo Molnar
2004-10-12 9:15 ` [patch] VP-2.6.9-rc4-mm1-T6 Ingo Molnar
2004-10-12 12:33 ` Ingo Molnar
2004-10-12 19:54 ` [patch] VP-2.6.9-rc4-mm1-T8 Ingo Molnar
2004-10-13 6:15 ` [patch] VP-2.6.9-rc4-mm1-T9 Ingo Molnar
2004-10-14 0:24 ` [patch] Real-Time Preemption, -VP-2.6.9-rc4-mm1-U0 Ingo Molnar
2004-10-14 14:31 ` [patch] Real-Time Preemption, -VP-2.6.9-rc4-mm1-U1 Ingo Molnar
2004-10-14 17:34 ` Adam Heath
2004-10-14 22:16 ` Adam Heath
2004-10-14 22:24 ` Ingo Molnar
2004-10-14 19:42 ` Daniel Walker
2004-10-14 19:57 ` Ingo Molnar
2004-10-14 20:34 ` Daniel Walker
[not found] ` <200410142216.23572.l_allegrucci@yahoo.it>
2004-10-14 20:21 ` Lee Revell
2004-10-14 20:28 ` Lorenzo Allegrucci
2004-10-14 20:39 ` K.R. Foley
2004-10-14 22:52 ` Radoslaw Szkodzinski
2004-10-15 11:22 ` Florian Schmidt
2004-10-15 11:44 ` Ingo Molnar
2004-10-15 12:25 ` Florian Schmidt
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=20041014194647.GA17579@nietzsche.lynx.com \
--to=bhuey@lnxw.com \
--cc=Mark_H_Johnson@raytheon.com \
--cc=akpm@osdl.org \
--cc=dipankar@in.ibm.com \
--cc=doogie@debian.org \
--cc=dwalker@mvista.com \
--cc=kr@cybsft.com \
--cc=l_allegrucci@yahoo.it \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rlrevell@joe-job.com \
--cc=rncbc@rncbc.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.