From: Grant Edwards <grant.b.edwards@gmail.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-rt-users@vger.kernel.org
Subject: Re: Using patch-2.6.33.7.2-rt30 increases latency and CPU usage?
Date: Tue, 15 May 2012 17:58:41 -0500 [thread overview]
Message-ID: <20120515225841.GA25360@grante> (raw)
In-Reply-To: <1337103192.14207.340.camel@gandalf.stny.rr.com>
On Tue, May 15, 2012 at 01:33:12PM -0400, Steven Rostedt wrote:
> On Wed, 2012-05-09 at 23:18 +0000, Grant Edwards wrote:
>
> > I eventually figured out that my increased interrupt latency is due to
> > my ISR being run in a kernel thread instead of as a real ISR. Adding
> > the IRQF_NODELAY flag gets me the same average latency I had without
> > the RT patch. [It looks like that flag has a different name in 2.6.39
> > and later?]
>
> Note, adding a IRQF_NODELAY is very dangerous. To keep the kernel
> fully preemptible (well mostly), spin-locks have been converted into
> mutexes. If the irq handler has one of these spinlocks that have been
> converted, it may schedule in the interrupt handler and crash the
> kernel. You can not schedule in interrupt context, which is why the
> RT kernel makes the interrupt handlers into threads.
Noted. Since the IRQF_NODELAY approach still misses the deadline 2-3%
of the time, that approach is probably off the list anyway. Right now
we're looking at using either FIQ interrupt or Xenomai.
> Also note, you may get better response if you up the interrupt
> thread's priority. Up it to 98, and you should see much better
> responses.
Thanks for the tip. I'll keep that in mind for some other projects
that would need latency times in the 100-200us range, which should be
doable.
> Now I don't think you will make the 20us under load, but you won't do
> that in the non-RT patch either.
Right. With the non-RT patch, the average response is about the same,
but the worst-case numbers are 2X-3X.
--
Grant
next prev parent reply other threads:[~2012-05-15 22:58 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-09 21:18 Using patch-2.6.33.7.2-rt30 increases latency and CPU usage? Grant Edwards
2012-05-09 22:00 ` Grant Edwards
2012-05-09 22:13 ` Joachim Achtzehnter
2012-05-09 23:18 ` Grant Edwards
2012-05-10 9:46 ` Remy Bohmer
2012-05-10 13:53 ` Grant Edwards
2012-05-11 13:42 ` Remy Bohmer
2012-05-11 13:56 ` Grant Edwards
2012-05-11 18:46 ` Tim Sander
2012-05-15 17:33 ` Steven Rostedt
2012-05-15 22:58 ` Grant Edwards [this message]
2012-05-15 23:06 ` Steven Rostedt
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=20120515225841.GA25360@grante \
--to=grant.b.edwards@gmail.com \
--cc=linux-rt-users@vger.kernel.org \
--cc=rostedt@goodmis.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;
as well as URLs for NNTP newsgroup(s).