From: yodaiken@fsmlabs.com
To: Joe deBlaquiere <jadb@redhat.com>
Cc: Andrew Morton <andrewm@uow.edu.au>,
yodaiken@fsmlabs.com, Nigel Gamble <nigel@nrg.org>,
linux-kernel@vger.kernel.org,
linux-audio-dev@ginette.musique.umontreal.ca
Subject: Re: [linux-audio-dev] low-latency scheduling patch for 2.4.0
Date: Mon, 29 Jan 2001 08:44:10 -0700 [thread overview]
Message-ID: <20010129084410.B32652@hq.fsmlabs.com> (raw)
In-Reply-To: <200101220150.UAA29623@renoir.op.net> <Pine.LNX.4.05.10101211754550.741-100000@cosmic.nrg.org>, <Pine.LNX.4.05.10101211754550.741-100000@cosmic.nrg.org>; <20010128061428.A21416@hq.fsmlabs.com> <3A742A79.6AF39EEE@uow.edu.au> <3A74462A.80804@redhat.com>
In-Reply-To: <3A74462A.80804@redhat.com>; from Joe deBlaquiere on Sun, Jan 28, 2001 at 10:17:46AM -0600
On Sun, Jan 28, 2001 at 10:17:46AM -0600, Joe deBlaquiere wrote:
> A recent example I came across is in the MTD code which invokes the
> erase algorithm for CFI memory. This algorithm spews a command sequence
> to the flash chips followed by a list of sectors to erase. Following
> each sector adress, the chip will wait for 50usec for another address,
> after which timeout it begins the erase cycle. With a RTLinux-style
> approach the driver is eventually going to fail to issue the command in
> time. There isn't any logic to detect and correct the preemption case,
> so it just gets confused and thinks the erase failed. Ergo, RTLinux and
> MTD are mutually exclusive. (I should probably note that I do not intend
> this as an indictment of RTLinux or MTD, but just an example of why
> preemption breaks the Linux driver model).
Only if your RTLinux application is running. In other words, you cannot
commit more than 100% of cpu cycle time and expect to deliver.
I think one of the common difficulties with realtime is that time-shared
systems with virtual memory make people used to elastic resource
limits and real-time has unforgiving time limits.
>
> So what is the solution in the preemption case? Should we re-write every
> driver to handle the preemption? Do we need a cli_yes_i_mean_it() for
> the cases where disabling interrupts is _absolutely_ required? Do we
> push drivers like MTD down into preemptable-Linux? Do we push all
> drivers down?
> In the meantime, fixing the few places where the kernel spends an
> extended period of time performing a task makes sense to me. If you're
> going to be busy for a while it is 'courteous' to allow the scheduler a
> chance to give some time to other threads. Of course it's hard to know
> when to draw the line.
Or what is the tradeoff or whether a deadlock will follow.
step 1: memory manager thread frees a few pages and is courteous
step 2: bunch of thrashing and eventually all processes stall
step 3: go to step 1
alternative
step 1: memory manager thread frees enough pages for some processes to
advance to termination
step 2: all is well
and make up 100 similar scenarios. And this is why "preemptive"
OS's tend to add such abominations as "priority inheritance" which
make failure cases rarer and harder to diagnose or complex schedulers
that spend a significant fraction of cpu time trying to figure out
what process should advance or ...
>
> So now I am starting to wonder about what needs to be profiled. Is there
> a mechanism in place now to measure the time spent with interrupts off,
> for instance? I know this has to have been quantified to some extent, right?
>
> --
> Joe deBlaquiere
> Red Hat, Inc.
> 307 Wynn Drive
> Huntsville AL, 35805
> voice : (256)-704-9200
> fax : (256)-837-3839
--
---------------------------------------------------------
Victor Yodaiken
Finite State Machine Labs: The RTLinux Company.
www.fsmlabs.com www.rtlinux.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2001-01-29 15:44 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-01-07 2:53 low-latency scheduling patch for 2.4.0 Andrew Morton
2001-01-11 3:12 ` [linux-audio-dev] " Jay Ts
2001-01-11 3:22 ` Cort Dougan
2001-01-11 12:38 ` Alan Cox
2001-01-11 11:30 ` Andrew Morton
2001-01-11 5:19 ` David S. Miller
2001-01-11 13:57 ` Daniel Phillips
2001-01-11 20:55 ` Nigel Gamble
2001-01-11 21:31 ` David S. Miller
2001-01-15 5:27 ` george anzinger
2001-01-12 13:30 ` Andrew Morton
2001-01-12 15:11 ` Tim Wright
2001-01-12 22:30 ` Nigel Gamble
2001-01-13 1:01 ` Andrew Morton
2001-01-15 19:46 ` Tim Wright
2001-01-12 22:46 ` Nigel Gamble
2001-01-12 23:08 ` george anzinger
2001-01-21 0:05 ` yodaiken
2001-01-22 0:54 ` Nigel Gamble
2001-01-22 1:49 ` Paul Barton-Davis
2001-01-22 2:21 ` Nigel Gamble
2001-01-22 3:31 ` J Sloan
2001-01-28 13:14 ` yodaiken
2001-01-28 14:07 ` Bill Huey
2001-01-28 14:26 ` Andrew Morton
2001-01-29 5:02 ` yodaiken
2001-01-28 14:19 ` Andrew Morton
2001-01-28 16:17 ` Joe deBlaquiere
2001-01-29 15:44 ` yodaiken [this message]
2001-01-29 17:23 ` Joe deBlaquiere
2001-01-29 17:38 ` yodaiken
2001-01-29 18:03 ` Joe deBlaquiere
2001-01-30 15:08 ` David Woodhouse
2001-01-30 15:44 ` Joe deBlaquiere
2001-01-30 16:29 ` Paul Davis
2001-01-30 16:35 ` David Woodhouse
2001-01-31 7:55 ` george anzinger
2001-01-30 16:19 ` David Woodhouse
2001-02-01 12:40 ` Pavel Machek
2001-02-01 22:33 ` David Woodhouse
2001-02-02 4:17 ` Joe deBlaquiere
2001-01-30 20:51 ` yodaiken
2001-01-30 21:00 ` David Woodhouse
2001-01-29 22:08 ` Pavel Machek
2001-01-29 22:31 ` Roger Larsson
2001-01-29 23:46 ` Joe deBlaquiere
2001-01-30 15:08 ` David Woodhouse
2001-01-12 13:21 ` Andrew Morton
2001-01-13 2:45 ` Jay Ts
2001-01-21 0:10 ` yodaiken
2001-01-26 9:14 ` Pavel Machek
2001-01-13 18:11 ` video drivers hog pci bus ? [was:[linux-audio-dev] low-latency scheduling patch for 2.4.0] Jörn Nettingsmeier
2001-01-14 11:35 ` low-latency scheduling patch for 2.4.0 Andrew Morton
2001-01-14 14:38 ` Gregory Maxwell
2001-01-15 10:59 ` Andrew Morton
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=20010129084410.B32652@hq.fsmlabs.com \
--to=yodaiken@fsmlabs.com \
--cc=andrewm@uow.edu.au \
--cc=jadb@redhat.com \
--cc=linux-audio-dev@ginette.musique.umontreal.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=nigel@nrg.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox