public inbox for linux-rt-users@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: "Moore, Thomas (FtWorth)" <Thomas.Moore2@ATK.COM>
Cc: "linux-rt-users@vger.kernel.org" <linux-rt-users@vger.kernel.org>
Subject: Re: File I/O in a Realtime Process
Date: Thu, 12 Apr 2012 21:41:43 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LFD.2.02.1204122128260.2542@ionos> (raw)
In-Reply-To: <7B6FE55CD594D7478CED8A39DF3BFC0A02B4FE@UT40SEM2.atk.com>

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

      reply	other threads:[~2012-04-12 19:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-12 16:21 File I/O in a Realtime Process Moore, Thomas (FtWorth)
2012-04-12 19:41 ` Thomas Gleixner [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=alpine.LFD.2.02.1204122128260.2542@ionos \
    --to=tglx@linutronix.de \
    --cc=Thomas.Moore2@ATK.COM \
    --cc=linux-rt-users@vger.kernel.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