From: Nicholas Mc Guire <der.herr@hofr.at>
To: Tim Blechmann <tim@klingt.org>
Cc: linux-rt-users@vger.kernel.org
Subject: Re: rt file i/o
Date: Wed, 4 Nov 2009 18:09:28 +0100 [thread overview]
Message-ID: <20091104170928.GA1702@opentech.at> (raw)
In-Reply-To: <hcs6dr$235$1@ger.gmane.org>
On Wed, 04 Nov 2009, Tim Blechmann wrote:
> hi all,
>
> having read the howto build an rt-application, i am trying to think of a
> way to handle disk i/o in my application.
>
> the howto suggest to avoid file i/o in non-rt helper threads, but to
> move them to another process. while the howto suggests using network
> socket, i'm curious, if other ipc primitives like shared memory would
> give better throughput? or would i experience any issues, like is it
> possible to lock shared memory to physical ram?
>
this is probably a bit off topic - but both RTLinux/GPL (RTLFS) and L4 have
implemented RT IDE drivers - limited to dedicated discs - the performance
is really bad (aprox. 800k/s) - so determinism on a device that really
lives from cache/pre-fetch and large-block access is very expensive.
What such a driver can give you at best is a guaranteed bandwidth, and
a worst case latency that is not really too atractive (tens of milliseconds)
So probably the best option is to have a user-space/non-RT driver access the
disk and pre-fetch/cache a "large" chunk of what you want to read/write to
de-couple RT from non-RT - this has been the model used i.e. for RAT (Real-time
Audio Tools see proceedings of the 6th Real Time Linux Workshop - Singapur)
quite successfully - as long as the I/O rate your RT-app expects is
sufficiently much smaller than the I/O capability of the device driver AND you
ensure the bandwidth (i.e. by raising the respective irq-thread priority, and
restricting other I/O to that controler/disk) this is actually a quite
deterministic approach provided your buffering is not too small.
Generally you will not be able to analyze paths of complex hardware/software
like disk-subsystems in a GPOS to the point were you can give absolute
guarantees - what you can achieve though is statistic guarantees, and in
combination with monitoring of the cached data you can (atleast for
some access patters) give guarantees about the behavior of the system.
hofrat
RAT http://www.osadl.org/Papers.rtlws-2004-papers.0.html#PAPER_2590
RTLFS http://www.osadl.org/Papers.rtlws-2004-papers.0.html#PAPER_1889
prev parent reply other threads:[~2009-11-04 17:17 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-04 15:25 rt file i/o Tim Blechmann
2009-11-04 15:43 ` Mark Knecht
2009-11-04 15:52 ` Tim Blechmann
2009-11-04 17:14 ` Nicholas Mc Guire
2009-11-04 17:32 ` Tim Blechmann
2009-11-04 22:41 ` Nicholas Mc Guire
2009-11-04 22:44 ` Clark Williams
2009-11-05 4:30 ` Shane M Smith
2009-11-05 9:29 ` Tim Blechmann
2009-11-05 20:30 ` Remy Bohmer
2009-11-05 9:22 ` Sven-Thorsten Dietrich
2009-11-05 4:14 ` Mark Knecht
2009-11-04 17:09 ` Nicholas Mc Guire [this message]
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=20091104170928.GA1702@opentech.at \
--to=der.herr@hofr.at \
--cc=linux-rt-users@vger.kernel.org \
--cc=tim@klingt.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.