Thread (12 messages) 12 messages, 5 authors, 2012-05-15

Re: Using patch-2.6.33.7.2-rt30 increases latency and CPU usage?

From: Grant Edwards <hidden>
Date: 2012-05-09 23:18:19

On 2012-05-09, Joachim Achtzehnter [off-list ref] wrote:
Grant Edwards wrote:
quoted
I've been loaned a clue by somebody on the OSADL mailing list: the RT
patches are for improving _user_space_ reponse, and may do so at the
expense of both CPU usage and interrupt latency.
The RT patches improve *worst case* latency. They are primarily
intended for applications that must *always* meet their deadlines,
not merely most of the time. In return you tend to get increased
average latency as well as reduced throughput.
Good point.

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?]
quoted
As a result, I'm better off without the RT patch if what I care
about is interrupt latency.
Yes, if you only care about *typical* interrupt latency but don't
mind the occasional long delay.
Unfortunately, the requirements are a bit fuzzy -- I've got an ISR
deadline of about 20us that I'm trying to meet [I wouldn't mind a
little chat with the person who designed _that_ requirement into the
hardware].  What I don't know is how hard that deadline is.  With the
RT patch (and without IRQF_NODELAY), I miss the deadline most of the
time (I'd guess about 80% of the time).

Without RT or with RT and IRQF_NODELAY, it looks like I meet the
deadline maybe 98% of the time (under test conditions).  What I don't
know is if once the deadline is missed it matters weather it's missed
by 50us or by 250us [or if 98% is going to be anywhere close to
acceptible, for that matter].

-- 
Grant
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help