* File I/O in a Realtime Process
@ 2012-04-12 16:21 Moore, Thomas (FtWorth)
2012-04-12 19:41 ` Thomas Gleixner
0 siblings, 1 reply; 2+ messages in thread
From: Moore, Thomas (FtWorth) @ 2012-04-12 16:21 UTC (permalink / raw)
To: linux-rt-users@vger.kernel.org
Hello,
In reviewing the documentation for the PREEMPT_RT patch, it's made pretty clear that performing file I/O (or page faults in general) will degrade realtime performance. The "HOWTO: Build an RT-application" on the wiki also states that page faults from one application will not interfere with the realtime performance of an application. Based on this understanding, if a system utilizing the PREEMPT_RT patch had requirements to perform file I/O, would it be required to have a separate non-realtime process that performs this task or would it be possible to use a low priority thread in the realtime process?
Thanks,
Thomas Moore
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: File I/O in a Realtime Process
2012-04-12 16:21 File I/O in a Realtime Process Moore, Thomas (FtWorth)
@ 2012-04-12 19:41 ` Thomas Gleixner
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Gleixner @ 2012-04-12 19:41 UTC (permalink / raw)
To: Moore, Thomas (FtWorth); +Cc: linux-rt-users@vger.kernel.org
On Thu, 12 Apr 2012, Moore, Thomas (FtWorth) wrote:
> In reviewing the documentation for the PREEMPT_RT patch, it's made
> pretty clear that performing file I/O (or page faults in general)
> will degrade realtime performance. The "HOWTO: Build an
> RT-application" on the wiki also states that page faults from one
> application will not interfere with the realtime performance of an
> application. Based on this understanding, if a system utilizing the
> PREEMPT_RT patch had requirements to perform file I/O, would it be
> required to have a separate non-realtime process that performs this
> task or would it be possible to use a low priority thread in the
> realtime process?
The point is, that file I/O is not deterministic by any means, so it's
not recommended to use file operations in your high priority task.
So if you do file I/O form a non-rt thread in the same process it does
not affect the rt-task except for the following:
- TLB shootdown interrupts might interfere minimally (you probably
won't notice)
- page faults processing can hold mmap semaphore of the process for
some time, which might affect your rt task if it uses
pthread_mutexes which are shared and not marked private or some
other form of process shared memory which requires mmap sem to be
held.
Aside of that, it's pretty much safe to do the file I/O from a non-rt
task within the same process.
Thanks,
tglx
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-04-12 19:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-12 16:21 File I/O in a Realtime Process Moore, Thomas (FtWorth)
2012-04-12 19:41 ` Thomas Gleixner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).